Fix buffer overflow in init(8) tokenizer.
This commit is contained in:
parent
29b375dcb1
commit
da24b330e0
1 changed files with 2 additions and 1 deletions
|
@ -949,8 +949,9 @@ static char** tokenize(size_t* out_tokens_used, const char* string)
|
|||
bool singly = false;
|
||||
bool doubly = false;
|
||||
bool escaped = false;
|
||||
for ( char c = *string++; c; c = *string++ )
|
||||
while ( *string )
|
||||
{
|
||||
char c = *string++;
|
||||
if ( !escaped && !singly && !doubly && isspace((unsigned char) c) )
|
||||
break;
|
||||
if ( !escaped && !doubly && c == '\'' )
|
||||
|
|
Loading…
Reference in a new issue