diff options
author | Chip Salzenberg <chip@perl.com> | 1997-04-11 07:49:15 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-04-25 00:00:00 +1200 |
commit | ece629c6e08b85a766c81ed2b23e0fedd51f8a89 (patch) | |
tree | 17ff1611fba392282889245668e7b7f5ecc2f015 /x2p | |
parent | ace5de9177b2ac52e0ddcbfae330cb6f233576f6 (diff) | |
download | perl-ece629c6e08b85a766c81ed2b23e0fedd51f8a89.tar.gz |
Fix buffer overflow in a2p
Diffstat (limited to 'x2p')
-rw-r--r-- | x2p/a2py.c | 4 |
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; |