Commit 71fb99cb authored by Alan Coopersmith's avatar Alan Coopersmith Committed by Ulrich Sibiller

Free fs->properties in XF86BigfontQueryFont overflow error path

Fixes small memory leak introduced in commit 5669a22081 Reported-by: 's avatarJulien Cristau <jcristau@debian.org> Signed-off-by: 's avatarAlan Coopersmith <alan.coopersmith@oracle.com> Hint: Upstream commit 5669a22081 is "integer overflow in _XF86BigfontQueryFont() [CVE-2013-1981 2/13]" Backported-to-NX-by: 's avatarUlrich Sibiller <uli42@gmx.de>
parent 78ed2333
......@@ -508,6 +508,7 @@ _XF86BigfontQueryFont (
any real font needs, so the combined total doesn't overflow either */
if (reply.nUniqCharInfos > ((ULONG_MAX / 2) / SIZEOF(xCharInfo)) ||
reply.nCharInfos > ((ULONG_MAX / 2) / sizeof(CARD16))) {
Xfree((char *) fs->properties);
Xfree((char *) fs);
_XEatDataWords(dpy, reply_left);
return (XFontStruct *)NULL;
......
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