summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorJonathan Kew <jfkthame@googlemail.com>2008-08-07 21:16:19 +0000
committerJonathan Kew <jfkthame@googlemail.com>2008-08-07 21:16:19 +0000
commit4d766917d2184021cbe4c36a6283e90fc3e091dd (patch)
tree8ec446dba2b765904d5b6b3a4ddb19d25a4722a9 /Build
parent0623c5dbdba93ded6c215bb7e6c7dfcf8970c44f (diff)
fix stack-smashing bug in print_error
git-svn-id: svn://tug.org/texlive/trunk@10149 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfmx/src/specials.c4
-rw-r--r--Build/source/texk/xdvipdfmx/src/specials.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/texk/dvipdfmx/src/specials.c b/Build/source/texk/dvipdfmx/src/specials.c
index ac938c0b61b..edb0159a771 100644
--- a/Build/source/texk/dvipdfmx/src/specials.c
+++ b/Build/source/texk/dvipdfmx/src/specials.c
@@ -530,7 +530,7 @@ print_error (const char *name, struct spc_env *spe, struct spc_arg *ap)
if (isprint(*p))
ebuf[i++] = *p;
else if (i + 4 < 63)
- i += sprintf(ebuf + i, "\\x%02x", *p);
+ i += sprintf(ebuf + i, "\\x%02x", (unsigned char)*p);
else
break;
}
@@ -546,7 +546,7 @@ print_error (const char *name, struct spc_env *spe, struct spc_arg *ap)
if (isprint(*p))
ebuf[i++] = *p;
else if (i + 4 < 63)
- i += sprintf(ebuf + i, "\\x%02x", *p);
+ i += sprintf(ebuf + i, "\\x%02x", (unsigned char)*p);
else
break;
}
diff --git a/Build/source/texk/xdvipdfmx/src/specials.c b/Build/source/texk/xdvipdfmx/src/specials.c
index 168504c3728..c9086513a13 100644
--- a/Build/source/texk/xdvipdfmx/src/specials.c
+++ b/Build/source/texk/xdvipdfmx/src/specials.c
@@ -540,7 +540,7 @@ print_error (const char *name, struct spc_env *spe, struct spc_arg *ap)
if (isprint(*p))
ebuf[i++] = *p;
else if (i + 4 < 63)
- i += sprintf(ebuf + i, "\\x%02x", *p);
+ i += sprintf(ebuf + i, "\\x%02x", (unsigned char)*p);
else
break;
}
@@ -556,7 +556,7 @@ print_error (const char *name, struct spc_env *spe, struct spc_arg *ap)
if (isprint(*p))
ebuf[i++] = *p;
else if (i + 4 < 63)
- i += sprintf(ebuf + i, "\\x%02x", *p);
+ i += sprintf(ebuf + i, "\\x%02x", (unsigned char)*p);
else
break;
}