Bug 66451

Summary: pdffonts crashed with SIGSEGV in Page::getResourceDictCopy
Product: poppler Reporter: Jason Crain <jason>
Component: utilsAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: PDF crashes pdffonts
Check for NULL in Page::getResourceDictCopy

Description Jason Crain 2013-07-01 11:26:26 UTC
Created attachment 81796 [details]
PDF crashes pdffonts

I created this PDF to test some font issues.  When I run pdffonts on this file, it crashes with a segmentation fault.

Program received signal SIGSEGV, Segmentation fault.
__pthread_mutex_lock (mutex=0x28) at pthread_mutex_lock.c:50
50	pthread_mutex_lock.c: No such file or directory.

backtrace:

#0  __pthread_mutex_lock (mutex=0x28) at pthread_mutex_lock.c:50
#1  0x00007ffff79f112a in MutexLocker::MutexLocker (this=0x7fffffffd640, mutexA=0x28) at ../goo/GooMutex.h:74
#2  0x00007ffff7a06702 in Dict::copy (this=0x0, xrefA=0x63e890) at Dict.cc:105
#3  0x00007ffff7a79220 in Page::getResourceDictCopy (this=0x649790, xrefA=0x63e890) at Page.cc:366
#4  0x00007ffff7a0f7f2 in FontInfoScanner::scan (this=0x7fffffffd760, nPages=1) at FontInfo.cc:76
#5  0x0000000000401680 in main (argc=2, argv=0x7fffffffd958) at pdffonts.cc:157
Comment 1 Jason Crain 2013-07-01 11:27:57 UTC
Created attachment 81797 [details] [review]
Check for NULL in Page::getResourceDictCopy

Attached patch adds a NULL check in Page::getResourceDictCopy
Comment 2 Albert Astals Cid 2013-07-01 17:44:44 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.