From 2ef88a94ea6a99d154bba3123bb2aba09767ef55 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Sat, 29 Apr 2006 18:52:23 +0000 Subject: (read_header): Give fatal error if input has no header. --- lib-src/ChangeLog | 4 ++++ lib-src/fakemail.c | 2 ++ 2 files changed, 6 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index a38c0cb6770..31f69a5bcd9 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2006-04-29 Richard Stallman + + * fakemail.c (read_header): Give fatal error if input has no header. + 2006-04-02 Paul Eggert * b2m.c (main): Don't include . diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c index 6b8634f34ab..30d39db533e 100644 --- a/lib-src/fakemail.c +++ b/lib-src/fakemail.c @@ -694,6 +694,8 @@ read_header () } while (true); + if (! the_header) + fatal ("input message has no header"); return the_header->next; } -- cgit v1.2.1 From 5e5b35c7ecd964144de14dc63dff22f410160d68 Mon Sep 17 00:00:00 2001 From: Richard M. Stallman Date: Sat, 29 Apr 2006 18:55:19 +0000 Subject: (main): Check for negative value from `read'. --- lib-src/ChangeLog | 2 ++ lib-src/movemail.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 31f69a5bcd9..d2004183a83 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,7 @@ 2006-04-29 Richard Stallman + * movemail.c (main): Check for negative value from `read'. + * fakemail.c (read_header): Give fatal error if input has no header. 2006-04-02 Paul Eggert diff --git a/lib-src/movemail.c b/lib-src/movemail.c index d3ec1fcd178..1f73ee88ba8 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -466,6 +466,8 @@ main (argc, argv) while (1) { nread = read (indesc, buf, sizeof buf); + if (nread < 0) + pfatal_with_name (inname); if (nread != write (outdesc, buf, nread)) { int saved_errno = errno; -- cgit v1.2.1 From 7c47913be1bb883737220309d93d0359a9c9d096 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 29 Apr 2006 20:15:48 +0000 Subject: Delete c-indentation-style local variable. --- lib-src/ChangeLog | 4 ++++ lib-src/etags.c | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index d2004183a83..6c3091e5906 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,7 @@ +2006-04-29 Dan Nicolaescu + + * etags.c: Delete c-indentation-style local variable. + 2006-04-29 Richard Stallman * movemail.c (main): Check for negative value from `read'. diff --git a/lib-src/etags.c b/lib-src/etags.c index a073acb92d6..a7c98f090bb 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -6887,7 +6887,6 @@ xrealloc (ptr, size) /* * Local Variables: - * c-indentation-style: gnu * indent-tabs-mode: t * tab-width: 8 * fill-column: 79 -- cgit v1.2.1 From cdeda579513bea2a3fbf5916e0b08eb08c0b91a0 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 29 Apr 2006 21:36:04 +0000 Subject: (yow): Free buf. --- lib-src/ChangeLog | 2 ++ lib-src/yow.c | 1 + 2 files changed, 3 insertions(+) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 6c3091e5906..1118ac226e2 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,7 @@ 2006-04-29 Dan Nicolaescu + * yow.c (yow): Free buf. + * etags.c: Delete c-indentation-style local variable. 2006-04-29 Richard Stallman diff --git a/lib-src/yow.c b/lib-src/yow.c index 1356ac6db18..18f0f7b2e13 100644 --- a/lib-src/yow.c +++ b/lib-src/yow.c @@ -176,6 +176,7 @@ yow (fp) } buf[i++] = 0; printf("%s\n", buf); + free (buf); } /* arch-tag: e40fc0df-bafb-4001-af24-5c883d1c685e -- cgit v1.2.1 From 7fe8b491e19c8f4a64c97c876c563506157f3868 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Sat, 29 Apr 2006 22:15:04 +0000 Subject: (main): Initialize docs to NULL. --- lib-src/ChangeLog | 2 ++ lib-src/sorted-doc.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 1118ac226e2..115e43c2d03 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,5 +1,7 @@ 2006-04-29 Dan Nicolaescu + * sorted-doc.c (main): Initialize docs to NULL. + * yow.c (yow): Free buf. * etags.c: Delete c-indentation-style local variable. diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c index a2416993a1b..0a06aa2c984 100644 --- a/lib-src/sorted-doc.c +++ b/lib-src/sorted-doc.c @@ -131,7 +131,7 @@ main () register enum state state = WAITING; /* state at start */ int cnt = 0; /* number of DOCSTRs read */ - DOCSTR *docs; /* chain of allocated DOCSTRS */ + DOCSTR *docs = NULL; /* chain of allocated DOCSTRS */ char buf[512]; /* line buffer */ while (1) /* process one char at a time */ -- cgit v1.2.1 From 7e237d2403a7650ebbf1ded6518c850cb0225956 Mon Sep 17 00:00:00 2001 From: Francesco Potortì Date: Tue, 2 May 2006 10:15:29 +0000 Subject: (Perl_functions): Free space allocated for var package. (Erlang_functions): Possibly free space allocated for var last. (Prolog_functions): Possibly free space allocated for var last. --- lib-src/ChangeLog | 6 ++++++ lib-src/etags.c | 13 +++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) (limited to 'lib-src') diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 115e43c2d03..2e8581a6f57 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2006-05-02 Francesco Potort,Al(B + + * etags.c (Perl_functions): Free space allocated for var package. + (Erlang_functions): Possibly free space allocated for var last. + (Prolog_functions): Possibly free space allocated for var last. + 2006-04-29 Dan Nicolaescu * sorted-doc.c (main): Initialize docs to NULL. diff --git a/lib-src/etags.c b/lib-src/etags.c index a7c98f090bb..e206443f39b 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -41,7 +41,7 @@ * configuration file containing regexp definitions for etags. */ -char pot_etags_version[] = "@(#) pot revision number is 17.15"; +char pot_etags_version[] = "@(#) pot revision number is 17.17"; #define TRUE 1 #define FALSE 0 @@ -4543,6 +4543,7 @@ Perl_functions (inf) lb.buffer, cp - lb.buffer + 1, lineno, linecharno); } } + free (package); } @@ -5441,6 +5442,8 @@ Prolog_functions (inf) last[len] = '\0'; } } + if (last != NULL) + free (last); } @@ -5597,7 +5600,11 @@ Erlang_functions (inf) else if (cp[0] == '-') /* attribute, e.g. "-define" */ { erlang_attribute (cp); - last = NULL; + if (last != NULL) + { + free (last); + last = NULL; + } } else if ((len = erlang_func (cp, last)) > 0) { @@ -5614,6 +5621,8 @@ Erlang_functions (inf) last[len] = '\0'; } } + if (last != NULL) + free (last); } -- cgit v1.2.1