Bug 7688 - nGfxBlendModeNames has incorrect size
Summary: nGfxBlendModeNames has incorrect size
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: splash backend (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Windows (All)
: high normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-29 19:29 UTC by Krzysztof Kowalczyk
Modified: 2006-07-30 13:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch that sets the correct size of nGfxBlendModes (826 bytes, patch)
2006-07-29 19:30 UTC, Krzysztof Kowalczyk
Details | Splinter Review
new patch that does not use a define to define the number of elements of the array (997 bytes, patch)
2006-07-30 03:27 UTC, Albert Astals Cid
Details | Splinter Review

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.