Fix NULL dereference in active_edges_to_traps() provoked by

https://gitlab.freedesktop.org/poppler/poppler/-/issues/1579
This commit is contained in:
William Bader 2025-04-21 19:47:55 +02:00
parent 7fd0cd0a9c
commit 7a15ba7284
No known key found for this signature in database
GPG key ID: 0918EC276CE143EC

View file

@ -468,6 +468,9 @@ active_edges_to_traps (sweep_line_t *sweep)
edge_t *left, *right;
int winding;
if (unlikely (pos == NULL))
break;
left = pos;
winding = left->dir;
@ -503,6 +506,8 @@ active_edges_to_traps (sweep_line_t *sweep)
* boxes.
*/
winding += right->dir;
if (unlikely (right->next == NULL))
break;
if (winding == 0 && right->x != right->next->x)
break;