Check for write errors
authormarc <devnull@localhost>
Fri, 17 Oct 1997 18:12:09 +0000 (18:12 +0000)
committermarc <devnull@localhost>
Fri, 17 Oct 1997 18:12:09 +0000 (18:12 +0000)
CVS patchset: 1865
CVS date: 1997/10/17 18:12:09

lib/rpmlead.c

index af6a131..e675ded 100644 (file)
@@ -32,7 +32,9 @@ int writeLead(int fd, struct rpmlead *lead)
     l.osnum = htons(l.osnum);
     l.signature_type = htons(l.signature_type);
        
-    write(fd, &l, sizeof(l));
+    if (write(fd, &l, sizeof(l)) < 0) {
+       return 1;
+    }
 
     return 0;
 }