Commit 5fabaca
committed
smart_pkt: fix buffer overflow when parsing "unpack" packets
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.1 parent b5ba7af commit 5fabaca
1 file changed
+2
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
350 | 350 | | |
351 | 351 | | |
352 | 352 | | |
353 | | - | |
354 | | - | |
355 | 353 | | |
356 | 354 | | |
357 | | - | |
358 | 355 | | |
359 | | - | |
| 356 | + | |
| 357 | + | |
360 | 358 | | |
361 | 359 | | |
362 | 360 | | |
| |||
0 commit comments