diff options
author | Richard M. Stallman <rms@gnu.org> | 2006-04-29 18:55:19 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2006-04-29 18:55:19 +0000 |
commit | 5e5b35c7ecd964144de14dc63dff22f410160d68 (patch) | |
tree | f4a83c8c3b19b1306b4a056f9195962a3f59bcf1 | |
parent | 2ef88a94ea6a99d154bba3123bb2aba09767ef55 (diff) | |
download | emacs-5e5b35c7ecd964144de14dc63dff22f410160d68.tar.gz |
(main): Check for negative value from `read'.
-rw-r--r-- | lib-src/ChangeLog | 2 | ||||
-rw-r--r-- | lib-src/movemail.c | 2 |
2 files changed, 4 insertions, 0 deletions
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 <rms@gnu.org> + * 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 <eggert@cs.ucla.edu> 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; |