changeset 70280:bca72679c7d8

(main): Check for negative value from `read'.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 Apr 2006 18:55:14 +0000
parents 5eacff09a43d
children dc96f5cea97d
files lib-src/movemail.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/movemail.c	Sat Apr 29 18:52:23 2006 +0000
+++ b/lib-src/movemail.c	Sat Apr 29 18:55:14 2006 +0000
@@ -466,6 +466,8 @@
 	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;