division by zero in Gfx::doAxialShFill
Submitted by M.D..@..ich.de
Assigned to poppler-bugs
Description
Created attachment 31318 patch to avoid division-by-zero
A PDF document (which I can make available but which is too large to post here) could be viewed in "evince" but when I tried to print it the resulting PDF was invalid. It turned out that it contained "nan" literally in linear shade objects where numbers are expected. The NaNs were originating from poppler's Gfx::doAxialShFill function. Both tMin and tMax are zero in that situation (as was dy; dx was non-zero). For now, I've using the appended patch to work around the problem. (It seems to me that problem is in the intersection code but I didn't look deeper yet.)
Patch 31318, "patch to avoid division-by-zero":
patch-ap