[NTG-pdftex] bug in utils.c of pdftex-1.40-beta-20060213
Hartmut Henkel
hartmut_henkel at gmx.de
Tue May 2 00:10:07 CEST 2006
there is a silly but mostly harmless buffer overrun while reading array
p, sorry. Below is a patch.
Regards, Hartmut
--- utils.c.orig 2006-01-21 02:56:17.000000000 +0100
+++ utils.c 2006-05-01 20:48:35.000000000 +0200
@@ -1237,7 +1262,7 @@
{
enum { NONUM, DOTNONUM, INT, DOT, LEADDOT, FRAC } s = NONUM, t = NONUM;
char *p, *q, *r;
- for (p = q = r = a; *q != '\0';) {
+ for (p = q = r = a; *p != '\0';) {
switch (s) {
case NONUM:
if (*p >= '0' && *p <= '9')
@@ -1296,5 +1321,6 @@
*q++ = *p++;
t = s;
}
+ *q = '\0';
return a;
}
More information about the ntg-pdftex
mailing list