Bug 690649 - check arguments in gs_enumerate_files_*
Summary: check arguments in gs_enumerate_files_*
Status: RESOLVED INVALID
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: General (show other bugs)
Version: master
Hardware: PC Linux
: P4 normal
Assignee: Henry Stiles
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-23 12:54 UTC by Ralph Giles
Modified: 2011-11-10 17:27 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Giles 2009-07-23 12:54:59 UTC
Debugging the msvc build of gxps circa r9883, I discovered a segfault in
pjl_check_font_path(), which was assuming gs_enumerate_file_next would fail if
passed the return value of gs_enumerate_files_init(), even if the later returned
NULL to indicate failure.

This was fixed in r9884, but I think it's worth checking the arguments in the
implementations as well. The extra conditional isn't expensive relative to
talking to a filesystem, and we'll gain much better error recovery elsewhere.
Comment 1 Henry Stiles 2011-11-10 17:27:24 UTC
Closing, it isn't exactly clear what is being requested in the initial description.