Skip to content

Commit

Permalink
Fix buffer overflow in a2p
Browse files Browse the repository at this point in the history
  • Loading branch information
Chip Salzenberg authored and Chip Salzenberg committed Apr 24, 1997
1 parent ace5de9 commit ece629c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x2p/a2py.c
Expand Up @@ -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;
Expand Down

0 comments on commit ece629c

Please sign in to comment.