[poppler] Bug in GfxState.cc. What's the fix?

William Bader williambader at hotmail.com
Wed May 4 00:02:58 UTC 2016


All of the cases in that switch in GfxPatchMeshShading::parse() are subtly different. Does someone have a PDF that exercises that code to see the effect of changing it?
Shading bugs can produce visible artifacts like https://bugs.freedesktop.org/show_bug.cgi?id=90570 so if you have a PDF that gets into that code, it should be easy to see which version of the assignments is correct.
William
> From: aacid at kde.org
> To: poppler at lists.freedesktop.org
> Date: Wed, 4 May 2016 01:40:33 +0200
> Subject: [poppler] Bug in GfxState.cc. What's the fix?
> 
> If you look at line 5550 of GfxState.cc you'll see
> 
> 	  p->color[0][1].c[j] = patchesA[nPatchesA-1].color[1][0].c[j];
> 	  p->color[0][1].c[j] = patchesA[nPatchesA-1].color[0][0].c[j];
> 
> If you look carefully enough you see as we're setting a value and then 
> immediately overwriting it \o/
> 
> I've no idea of what this code does but by symmetry with line 5724 i'd say it 
> should be
> 
> 	  p->color[0][0].c[j] = patchesA[nPatchesA-1].color[1][0].c[j];
> 	  p->color[0][1].c[j] = patchesA[nPatchesA-1].color[0][0].c[j];
> 
> Opinions?
> 
> Cheers,
>   Albert
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20160503/1c535e3b/attachment.html>


More information about the poppler mailing list