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.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| blob | Loading commit data... | |
| commit | Loading commit data... | |
| raw | Loading commit data... | |
| tag | Loading commit data... | |
| tree | Loading commit data... | |
| cache.c | Loading commit data... | |
| lookup.c | Loading commit data... | |
| lookupbypath.c | Loading commit data... | |
| message.c | Loading commit data... | |
| peel.c | Loading commit data... | |
| shortid.c | Loading commit data... |