mirror of
https://gitlab.freedesktop.org/xorg/lib/libx11.git
synced 2026-05-07 09:48:04 +02:00
added error check in Xcms color file parser; closes bug #15305
This commit is contained in:
parent
12e8d0d01d
commit
a19f9c65ee
1 changed files with 6 additions and 1 deletions
|
|
@ -738,7 +738,12 @@ LoadColornameDB(void)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue