mirror of https://github.com/mirror/busybox.git
Added a sanity check to fix weird bug exposed when sourcing in commands from a
file with lash. Based on report from Heinz Walter.1_00_stable_10817
parent
8a24a65d2f
commit
4b66dabc76
libbb
|
@ -33,7 +33,11 @@
|
|||
|
||||
void trim(char *s)
|
||||
{
|
||||
int len=strlen(s);
|
||||
int len = strlen(s);
|
||||
|
||||
/* sanity check */
|
||||
if (len == 0)
|
||||
return;
|
||||
|
||||
/* trim trailing whitespace */
|
||||
while ( len > 0 && isspace(s[len-1]))
|
||||
|
|
Loading…
Reference in New Issue