YARN-5736 Addendum. Fixes segfault due to unterminated string. (Contributed by Miklos Szegedi via Daniel Templeton)
This commit is contained in:
parent
4fcea8a0c8
commit
264ddb13ff
@ -156,6 +156,7 @@ char* trim(char* input)
|
||||
}
|
||||
|
||||
strncpy(ret, val_begin, val_end - val_begin);
|
||||
ret[val_end - val_begin] = '\0';
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user