mirror of https://github.com/mirror/busybox.git
parent
40e5e7c7ea
commit
ce4a586edb
2
lash.c
2
lash.c
|
@ -936,7 +936,7 @@ char * strsep_space( char *string, int * index)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
token = xmalloc(*index);
|
token = xmalloc(*index+1);
|
||||||
token[*index] = '\0';
|
token[*index] = '\0';
|
||||||
strncpy(token, string, *index);
|
strncpy(token, string, *index);
|
||||||
|
|
||||||
|
|
2
sh.c
2
sh.c
|
@ -936,7 +936,7 @@ char * strsep_space( char *string, int * index)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
token = xmalloc(*index);
|
token = xmalloc(*index+1);
|
||||||
token[*index] = '\0';
|
token[*index] = '\0';
|
||||||
strncpy(token, string, *index);
|
strncpy(token, string, *index);
|
||||||
|
|
||||||
|
|
|
@ -936,7 +936,7 @@ char * strsep_space( char *string, int * index)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
token = xmalloc(*index);
|
token = xmalloc(*index+1);
|
||||||
token[*index] = '\0';
|
token[*index] = '\0';
|
||||||
strncpy(token, string, *index);
|
strncpy(token, string, *index);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue