Bug 690649

Summary: check arguments in gs_enumerate_files_*
Product: Ghostscript Reporter: Ralph Giles <ralph.giles>
Component: GeneralAssignee: Henry Stiles <henry.stiles>
Status: RESOLVED INVALID    
Severity: normal CC: christinedelight.top85, henry.stiles
Priority: P4    
Version: master   
Hardware: PC   
OS: Linux   
Customer: Word Size: ---

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.