Fix out of bounds read in LineArt if there are only interestion edges
In this case the array allocation would allocate an array of size zero. This would then later lead to out of bounds memory reads. Now the code will skip zero length allocations.
This commit is contained in:
parent
82fe475f06
commit
c1c0473a7e
|
@ -1799,7 +1799,7 @@ static void lineart_add_edge_to_array_thread(LineartObjectInfo *obi, LineartEdge
|
|||
* #pe. */
|
||||
void lineart_finalize_object_edge_array_reserve(LineartPendingEdges *pe, int count)
|
||||
{
|
||||
if (pe->max || pe->array) {
|
||||
if (pe->max || pe->array || count == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue