Commit 2064280
http-push: fix off-by-path_len
When getting the result of remote_ls(), we were advancing the variable
"path" to the relative path inside the repository.
However, then we went on to malloc a bogus amount of memory: we were
subtracting the prefix length _again_, quite possibly getting something
negative, which xmalloc() interprets as really, really much.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent ebb7bbf commit 2064280
1 file changed
+7
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
| 1437 | + | |
1437 | 1438 | | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
1441 | 1439 | | |
1442 | 1440 | | |
1443 | 1441 | | |
| |||
1448 | 1446 | | |
1449 | 1447 | | |
1450 | 1448 | | |
| 1449 | + | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1451 | 1455 | | |
1452 | 1456 | | |
1453 | 1457 | | |
| |||
0 commit comments