Bug 7924

Summary: CairoOutputDev::currentFont used before initialization.
Product: poppler Reporter: Pascal Terjan <pterjan>
Component: cairo backendAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: A PDF provoking crash
Initialize currentFont to NULL

Description Pascal Terjan 2006-08-19 14:06:03 UTC
Some methods (drawChar and endString) test that currentFont is not NULL but the
constructor does not set it to NULL. 
valgrind reports it to be read by endString before initialization on the
attached PDF on which I get a crash.
Comment 1 Pascal Terjan 2006-08-19 14:06:46 UTC
Created attachment 6615 [details]
A PDF provoking crash
Comment 2 Pascal Terjan 2006-08-19 14:07:53 UTC
Created attachment 6616 [details] [review]
Initialize currentFont to NULL
Comment 3 Pascal Terjan 2006-08-19 14:35:52 UTC
This patch fixes the crash for me on this PDF and 5 others.
Comment 4 Jeff Muizelaar 2006-09-04 18:22:57 UTC
Commited. Thanks.

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.