]> git.eshelyaron.com Git - emacs.git/commitdiff
(main): Check for negative value from `read'.
authorRichard M. Stallman <rms@gnu.org>
Sat, 29 Apr 2006 18:55:19 +0000 (18:55 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 29 Apr 2006 18:55:19 +0000 (18:55 +0000)
lib-src/ChangeLog
lib-src/movemail.c

index 31f69a5bcd91c8407e67475ded0d6f1239074ec9..d2004183a833a86dacc4e1bbf92acb4fa10da286 100644 (file)
@@ -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>
index d3ec1fcd178c70576423d24d21d5bb6224125bc6..1f73ee88ba88a38c6492e42584934686eec1a983 100644 (file)
@@ -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;