Module Name:    xsrc
Committed By:   christos
Date:           Sat May  9 15:07:49 UTC 2015

Modified Files:
        xsrc/external/mit/xorg-server/dist/os: utils.c

Log Message:
CID 1225080: check getrlimit return.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 xsrc/external/mit/xorg-server/dist/os/utils.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/xorg-server/dist/os/utils.c
diff -u xsrc/external/mit/xorg-server/dist/os/utils.c:1.6 xsrc/external/mit/xorg-server/dist/os/utils.c:1.7
--- xsrc/external/mit/xorg-server/dist/os/utils.c:1.6	Mon Jun  3 03:38:41 2013
+++ xsrc/external/mit/xorg-server/dist/os/utils.c	Sat May  9 11:07:49 2015
@@ -655,9 +655,10 @@ ProcessCommandLine(int argc, char *argv[
 	{
 #if !defined(WIN32) || !defined(__MINGW32__)
 	    struct rlimit   core_limit;
-	    getrlimit (RLIMIT_CORE, &core_limit);
-	    core_limit.rlim_cur = core_limit.rlim_max;
-	    setrlimit (RLIMIT_CORE, &core_limit);
+	    if (getrlimit (RLIMIT_CORE, &core_limit) != -1) {
+		    core_limit.rlim_cur = core_limit.rlim_max;
+		    setrlimit (RLIMIT_CORE, &core_limit);
+	    }
 #endif
 	    CoreDump = TRUE;
 	}

Reply via email to