smart_pkt.c
12.7 KB
-
smart_pkt: honor line length when determining packet type · a7e87dd5
When we parse the packet type of an incoming packet line, we do not verify that we don't overflow the provided line buffer. Fix this by using `git__prefixncmp` instead and passing in `len`. As we have previously already verified that `len <= linelen`, we thus won't ever overflow the provided buffer length. (cherry picked from commit 4a5804c9)
Patrick Steinhardt committed