Skip to content

cairo: prevent infinite loop in functionShadedFill()

Nelson Benítez León requested to merge nbenitez/poppler:fix_1520 into master

Prevent y_step and x_step to be zero, as that
would cause an infinite loop. Reproducible with
the pdf file posted in issue #1520

Thanks Wesley Moore for reporting and debugging.


I clamped the y_step and x_step to a minimun of subdivide_pixels which is the constant used to calculate the steps, in my reading of the code that should be ok as a minimum step required.

Anyway @ajohnson would know better as he wrote that function in commit 47ffce08

Closes #1520

Edited by Nelson Benítez León

Merge request reports