diff options
| author | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
|---|---|---|
| committer | svn2git <svn2git@FreeBSD.org> | 1994-05-01 08:00:00 +0000 |
| commit | a16f65c7d117419bd266c28a1901ef129a337569 (patch) | |
| tree | 2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /bin/sh/expand.c | |
| parent | 8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff) | |
Diffstat (limited to 'bin/sh/expand.c')
| -rw-r--r-- | bin/sh/expand.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index 1d5864d233bf..95d2e504cd70 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -664,8 +664,10 @@ expandmeta(str) savelastp = exparg.lastp; INTOFF; if (expdir == NULL) - expdir = ckmalloc(1024); /* I hope this is big enough */ + expdir = ckmalloc(8192); /* I hope this is big enough */ expmeta(expdir, str->text); + if(strlen(expdir) >= 8192) + error("malloc overflow in sh:expand.c in ckmalloc(8192)\n"); ckfree(expdir); expdir = NULL; INTON; |
