Commit cb62289
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 69cbeaa commit cb62289
1 file changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3476 | 3476 | | |
3477 | 3477 | | |
3478 | 3478 | | |
3479 | | - | |
| 3479 | + | |
3480 | 3480 | | |
3481 | 3481 | | |
3482 | 3482 | | |
| |||
3519 | 3519 | | |
3520 | 3520 | | |
3521 | 3521 | | |
| 3522 | + | |
| 3523 | + | |
3522 | 3524 | | |
3523 | 3525 | | |
3524 | 3526 | | |
3525 | 3527 | | |
3526 | 3528 | | |
3527 | 3529 | | |
| 3530 | + | |
3528 | 3531 | | |
3529 | 3532 | | |
3530 | 3533 | | |
| |||
0 commit comments