diff options
author | Rob Landley <rob@landley.net> | 2020-01-16 07:09:57 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2020-01-16 07:09:57 -0600 |
commit | dd75e81e3d3aeb02c6edf7df81cf969c548d9be6 (patch) | |
tree | 19d9b7fed076ae077b793f57b6fdaa9b1a659356 /lib | |
parent | 189d141c6095f86488af735a12d166be924d0511 (diff) | |
download | toybox-dd75e81e3d3aeb02c6edf7df81cf969c548d9be6.tar.gz |
The expand should expand.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/env.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -79,7 +79,7 @@ void xsetmyenv(int *envc, char ***env, char *name, char *val) // resize and null terminate if expanding if (!(*env)[i]) { len = i+1; - if (!(len&255)) *env = xrealloc(*env, len*sizeof(char *)); + if (!(len&255)) *env = xrealloc(*env, (len+256)*sizeof(char *)); (*env)[len] = 0; } (*env)[i] = new; |