[gs-cvs] rev 7214 - trunk/gs/src

ray at ghostscript.com ray at ghostscript.com
Tue Nov 21 12:21:35 PST 2006


Author: ray
Date: 2006-11-21 12:21:34 -0800 (Tue, 21 Nov 2006)
New Revision: 7214

Modified:
   trunk/gs/src/sfxstdio.c
Log:
Fix for ILLEGAL (\000) (r) file case seen with 23-09.ps 



Modified: trunk/gs/src/sfxstdio.c
===================================================================
--- trunk/gs/src/sfxstdio.c	2006-11-19 14:36:42 UTC (rev 7213)
+++ trunk/gs/src/sfxstdio.c	2006-11-21 20:21:34 UTC (rev 7214)
@@ -135,6 +135,8 @@
 	return code;
     if (fname == 0)
 	return 0;
+    if (fname[0] == 0)		/* fopen_proc gets NUL terminated string, not len */
+	return 0;		/* so this is the same as len == 0, so return NULL */
     code = (*fopen_proc)(iodev, (char *)(*ps)->cbuf, fmode, &file,
 			 (char *)(*ps)->cbuf, (*ps)->bsize);
     if (code < 0)



More information about the gs-cvs mailing list