Commit 0da0e92
builtin_diff(): read $GIT_DIFF_OPTS closer to use
The value returned by getenv() is not guaranteed to remain valid across
other environment function calls. But in between our call and using the
value, we run fill_textconv(), which may do quite a bit of work,
including spawning sub-processes.
We can make this safer by calling getenv() right before we actually look
at its value.
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent d64bb06 commit 0da0e92
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3444 | 3444 | | |
3445 | 3445 | | |
3446 | 3446 | | |
3447 | | - | |
| 3447 | + | |
3448 | 3448 | | |
3449 | 3449 | | |
3450 | 3450 | | |
| |||
3487 | 3487 | | |
3488 | 3488 | | |
3489 | 3489 | | |
| 3490 | + | |
| 3491 | + | |
3490 | 3492 | | |
3491 | 3493 | | |
3492 | 3494 | | |
3493 | 3495 | | |
3494 | 3496 | | |
3495 | 3497 | | |
| 3498 | + | |
3496 | 3499 | | |
3497 | 3500 | | |
3498 | 3501 | | |
| |||
0 commit comments