Module Name:    xsrc
Committed By:   christos
Date:           Sun Apr 24 18:22:49 UTC 2016

Modified Files:
        xsrc/external/mit/xrdb/dist: xrdb.c

Log Message:
CID 1358678: Don't pass -1 to fdopen(3)


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 xsrc/external/mit/xrdb/dist/xrdb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xrdb/dist/xrdb.c
diff -u xsrc/external/mit/xrdb/dist/xrdb.c:1.7 xsrc/external/mit/xrdb/dist/xrdb.c:1.8
--- xsrc/external/mit/xrdb/dist/xrdb.c:1.7	Mon Mar 17 06:03:20 2014
+++ xsrc/external/mit/xrdb/dist/xrdb.c	Sun Apr 24 14:22:49 2016
@@ -1225,7 +1225,7 @@ Process(int scrno, Bool doScreen, Bool e
 #else
 	{
 	int fd = mkstemp(template);
-	output = fdopen(fd, "w");
+	output = fd != -1 ? fdopen(fd, "w") : NULL;
 	}
 #endif
 	if (!output)

Reply via email to