Hack for buffer overflow, should be fixed properly.
This commit is contained in:
parent
c2cd510adf
commit
d9b609c70f
1 changed files with 4 additions and 1 deletions
|
@ -672,7 +672,10 @@ expandmeta(str)
|
|||
savelastp = exparg.lastp;
|
||||
INTOFF;
|
||||
if (expdir == NULL)
|
||||
expdir = ckmalloc(1024); /* I hope this is big enough */
|
||||
{
|
||||
int i = strlen(str->text);
|
||||
expdir = ckmalloc(i < 2048 ? 2048 : i); /* XXX */
|
||||
}
|
||||
expmeta(expdir, str->text);
|
||||
ckfree(expdir);
|
||||
expdir = NULL;
|
||||
|
|
Loading…
Reference in a new issue