Package: boinc / 7.14.2+dfsg-3

more_clang_warnings.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Description: adding another error check.
--- a/lib/shmem.cpp
+++ b/lib/shmem.cpp
@@ -339,7 +339,10 @@
         // area to all zeros because they write beyond the old EOF. 
         // See the lseek man page for details.
         lseek(fd, size-1, SEEK_SET);
-        write(fd, "\0", 1);
+        if (1 != write(fd, "\0", 1)) {
+	    close(fd);
+	    return ERR_SHMGET;
+	}
     }
 
     *pp = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_FILE | MAP_SHARED, fd, 0);