Commit 8149e4f
committed
Initialize rev before using &rev.pending
If reset_tree returns a non-zero value, stash_working_tree calls
object_array_clear with &rev.pending before rev is initialized. This
causes a segmentation fault. Prevent this by initializing rev before
calling reset_tree.
This fixes #2006.
Signed-off-by: Matthew Kraai <[email protected]>1 parent 7b95654 commit 8149e4f
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1048 | 1048 | | |
1049 | 1049 | | |
1050 | 1050 | | |
| 1051 | + | |
| 1052 | + | |
1051 | 1053 | | |
1052 | 1054 | | |
1053 | 1055 | | |
1054 | 1056 | | |
1055 | 1057 | | |
1056 | 1058 | | |
1057 | 1059 | | |
1058 | | - | |
1059 | 1060 | | |
1060 | 1061 | | |
1061 | 1062 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
290 | 298 | | |
291 | 299 | | |
292 | 300 | | |
| |||
0 commit comments