Bug 19305

Summary: [PATCH] delete of NULL pointer on Win32
Product: poppler Reporter: Ashish Kulkarni <ashkulz>
Component: generalAssignee: poppler-bugs <poppler-bugs>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: high Keywords: security
Version: unspecified   
Hardware: All   
OS: Windows (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: patch

Description Ashish Kulkarni 2008-12-28 07:39:40 UTC
Created attachment 21517 [details] [review]
patch

In poppler/GlobalParams.cc, winFontList is set to NULL in the constructor within a #ifdef WIN32. It is not changed anywhere (that code was removed in 9ced4442372d08375e0ded62f79052d8a3ec9cd6) and then an attempt is made to delete it in the destructor, which is a delete of NULL pointer (which could be a possible crash/security issue).

The attached patch fixes this issue and removes the WinFontList and WinFontInfo classes which aren't used anywhere in the code.
Comment 1 Albert Astals Cid 2008-12-28 11:39:59 UTC
delete NULL; is ok

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.