YARN-5736 Addendum. Fixes segfault due to unterminated string. (Contributed by Miklos Szegedi via Daniel Templeton)

This commit is contained in:
Daniel Templeton 2016-11-15 13:01:57 -08:00
parent 4fcea8a0c8
commit 264ddb13ff
1 changed files with 1 additions and 0 deletions

View File

@ -156,6 +156,7 @@ char* trim(char* input)
}
strncpy(ret, val_begin, val_end - val_begin);
ret[val_end - val_begin] = '\0';
return ret;
}