Hack for buffer overflow, should be fixed properly.
This commit is contained in:
parent
c2cd510adf
commit
d9b609c70f
@ -672,7 +672,10 @@ expandmeta(str)
|
|||||||
savelastp = exparg.lastp;
|
savelastp = exparg.lastp;
|
||||||
INTOFF;
|
INTOFF;
|
||||||
if (expdir == NULL)
|
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);
|
expmeta(expdir, str->text);
|
||||||
ckfree(expdir);
|
ckfree(expdir);
|
||||||
expdir = NULL;
|
expdir = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user