Commit d2b96c5d authored by Mike DePaulo's avatar Mike DePaulo Committed by Mike Gabriel

CVE-2014-0210: unvalidated length fields in fs_read_extent_info() from…

CVE-2014-0210: unvalidated length fields in fs_read_extent_info() from xorg/lib/libXfont commit a3f21421537620fc4e1f844a594a4bcd9f7e2bd8 Looping over the extents in the reply could go past the end of the reply buffer if the reply indicated more extents than could fit in the specified reply length.
parent a0bed4d9
......@@ -1069,6 +1069,16 @@ fs_read_extent_info(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
#endif
pCI = NULL;
}
else if (numExtents > ((rep->length - LENGTHOF(fsQueryXExtents16Reply))
/ LENGTHOF(fsXCharInfo))) {
#ifdef DEBUG
fprintf(stderr,
"fsQueryXExtents16: numExtents (%d) > (%d - %d) / %d\n",
numExtents, rep->length,
LENGTHOF(fsQueryXExtents16Reply), LENGTHOF(fsXCharInfo));
#endif
pCI = NULL;
}
else
pCI = malloc(sizeof(CharInfoRec) * numInfos);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment