[PATCH] xfree86: fix a memory leak in edidMakeAtom().

Alexander E. Patrakov patrakov at gmail.com
Thu Dec 17 01:14:20 PST 2015


17.12.2015 02:43, Leo Liu wrote:
> -    pNewProp->data = value;
> +    if (!(pNewProp->data = malloc(len * format/8)))
> +        return BadAlloc;
> +    memcpy(pNewProp->data, value, (len * format/8));

Is there any guarantee that len * format/8 will not overflow?

-- 
Alexander E. Patrakov


More information about the xorg-devel mailing list