smart_pkt.c
12.9 KB
-
smart_pkt: fix buffer overflow when parsing "unpack" packets · a8356af8
When checking whether an "unpack" packet returned the "ok" status or not, we use a call to `git__prefixcmp`. In case where the passed line isn't properly NUL terminated, though, this may overrun the line buffer. Fix this by using `git__prefixncmp` instead. (cherry picked from commit 5fabaca8)
Patrick Steinhardt committed