summaryrefslogtreecommitdiff
path: root/x2p
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-04-11 07:49:15 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-25 00:00:00 +1200
commitece629c6e08b85a766c81ed2b23e0fedd51f8a89 (patch)
tree17ff1611fba392282889245668e7b7f5ecc2f015 /x2p
parentace5de9177b2ac52e0ddcbfae330cb6f233576f6 (diff)
downloadperl-ece629c6e08b85a766c81ed2b23e0fedd51f8a89.tar.gz
Fix buffer overflow in a2p
Diffstat (limited to 'x2p')
-rw-r--r--x2p/a2py.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/x2p/a2py.c b/x2p/a2py.c
index ad685fe7e9..3a3cb5275d 100644
--- a/x2p/a2py.c
+++ b/x2p/a2py.c
@@ -1297,10 +1297,10 @@ int prevargs;
numargs = fixrargs(name,ops[arg+3].ival,numargs);
}
else {
- char tmpbuf[128];
-
+ char *tmpbuf = safemalloc(strlen(name) + (sizeof(prevargs) * 3) + 5);
sprintf(tmpbuf,"%s:%d",name,prevargs);
str = hfetch(curarghash,tmpbuf);
+ safefree(tmpbuf);
if (str && strEQ(str->str_ptr,"*")) {
if (type == OVAR || type == OSTAR) {
ops[arg].ival &= ~255;