-
commit: fix reading out of bounds when parsing encoding · 7655b2d8
The commit message encoding is currently being parsed by the `git__prefixcmp` function. As this function does not accept a buffer length, it will happily skip over a buffer's end if it is not `NUL` terminated. Fix the issue by using `git__prefixncmp` instead. Add a test that verifies that we are unable to parse the encoding field if it's cut off by the supplied buffer length.
Patrick Steinhardt committed
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
commitstagedfile.c | Loading commit data... | |
parse.c | Loading commit data... |