diff options
Diffstat (limited to 'x11/libX11/patches/patch-an')
-rw-r--r-- | x11/libX11/patches/patch-an | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/x11/libX11/patches/patch-an b/x11/libX11/patches/patch-an new file mode 100644 index 00000000000..b49ab5e896a --- /dev/null +++ b/x11/libX11/patches/patch-an @@ -0,0 +1,27 @@ +$NetBSD: patch-an,v 1.1 2008/07/24 01:07:31 bjs Exp $ + +Fix missing error condition (from GIT) + +added error check in Xcms color file parser; closes bug #15305 + +--- src/xcms/cmsColNm.c.orig 2008-03-06 15:45:06.000000000 -0500 ++++ src/xcms/cmsColNm.c +@@ -735,10 +735,17 @@ LoadColornameDB(void) + } + + if ((stream = _XFopenFile (pathname, "r")) == NULL) { ++ /* can't open file */ ++ XcmsColorDbState = XcmsDbInitFailure; + return(XcmsFailure); + } + +- stringSectionSize(stream, &nEntries, &size); ++ if (stringSectionSize(stream, &nEntries, &size) != XcmsSuccess || ++ nEntries == 0) { ++ (void) fclose(stream); ++ XcmsColorDbState = XcmsDbInitFailure; ++ return(XcmsFailure); ++ } + rewind(stream); + + strings = (char *) Xmalloc(size); |