Bug 7688

Summary: nGfxBlendModeNames has incorrect size
Product: poppler Reporter: Krzysztof Kowalczyk <kkowalczyk>
Component: splash backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: patch that sets the correct size of nGfxBlendModes
new patch that does not use a define to define the number of elements of the array

Description Krzysztof Kowalczyk 2006-07-29 19:29:29 UTC
nGfxBlendModeNames ends up being 34 instead of 17 (the size of gfxBlendModeNames
array). This will cause accessing invalid memory when traversing the
gfxBlendModeNames array in GfxState::parseBlendMode().

Attached patch fixes this issue.
Comment 1 Krzysztof Kowalczyk 2006-07-29 19:30:16 UTC
Created attachment 6398 [details] [review]
patch that sets the correct size of nGfxBlendModes
Comment 2 Albert Astals Cid 2006-07-30 03:25:50 UTC
As i don't like the fact of having the 17 defined there as a value i'm 
attaching a different patch, does it work for you? (it does for me)
Comment 3 Albert Astals Cid 2006-07-30 03:27:13 UTC
Created attachment 6399 [details] [review]
new patch that does not use a define to define the number of elements of the array
Comment 4 Krzysztof Kowalczyk 2006-07-30 12:10:46 UTC
That works too.
Comment 5 Albert Astals Cid 2006-07-30 13:34:10 UTC
Fixed in cvs, thanks for reporting

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.