Fix for 687340, Error: /rangecheck in --stringwidth--
Alex Cherepanov <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Organization | Coscript Software |
| Message-ID | <[email protected]> |
Immediately return the success for 0-length read from a string array. Don't seek to the offset because it may be invalid in some broken fonts. Fix bug 687340 _______________________________________________ gs-code-review mailing list [email protected] http://www.ghostscript.com/mailman/listinfo/gs-code-review
zfont42.c.diff
(text/plain, 484 B)
Index: gs/src/zfont42.c
===================================================================
RCS file: /cvs/ghostscript/gs/src/zfont42.c,v
retrieving revision 1.17
diff -b -u -r1.17 zfont42.c
--- a/gs/src/zfont42.c 15 Oct 2003 11:34:28 -0000 1.17
+++ b/gs/src/zfont42.c 5 Mar 2004 20:42:07 -0000
@@ -172,6 +172,8 @@
ulong left = offset;
uint index = 0;
+ if (length == 0)
+ return 0;
for (;; ++index) {
ref rstr;
int code = array_get(psa, index, &rstr);