strncpy only adds null terminating bytes if the source string is smaller than the destination string. Since this function relies on the string being null terminated when checking its contents, we better make sure there is at least a \0 as the last character. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Derek Foreman <derekf@osg.samsung.com>dev
parent
e54cee17a7
commit
9c7de167f8
Loading…
Reference in new issue