Commit 82fbf26
run_external_diff: use an argv_array for the command line
We currently generate the command-line for the external
command using a fixed-length array of size 10. But if there
is a rename, we actually need 11 elements (10 items, plus a
NULL), and end up writing a random NULL onto the stack.
Rather than bump the limit, let's just use an argv_array, which
makes this sort of error impossible.
Noticed-by: Max L <[email protected]>
Signed-off-by: Jeff King <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 0bc85ab commit 82fbf26
1 file changed
+16
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
2906 | 2907 | | |
2907 | 2908 | | |
2908 | 2909 | | |
2909 | | - | |
| 2910 | + | |
2910 | 2911 | | |
2911 | | - | |
2912 | 2912 | | |
2913 | 2913 | | |
2914 | 2914 | | |
| |||
2919 | 2919 | | |
2920 | 2920 | | |
2921 | 2921 | | |
2922 | | - | |
2923 | | - | |
2924 | | - | |
2925 | | - | |
2926 | | - | |
2927 | | - | |
2928 | | - | |
2929 | | - | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
| 2926 | + | |
| 2927 | + | |
| 2928 | + | |
| 2929 | + | |
2930 | 2930 | | |
2931 | | - | |
2932 | | - | |
| 2931 | + | |
| 2932 | + | |
2933 | 2933 | | |
2934 | 2934 | | |
2935 | | - | |
2936 | | - | |
| 2935 | + | |
| 2936 | + | |
2937 | 2937 | | |
2938 | | - | |
2939 | 2938 | | |
2940 | 2939 | | |
2941 | 2940 | | |
| |||
2944 | 2943 | | |
2945 | 2944 | | |
2946 | 2945 | | |
2947 | | - | |
| 2946 | + | |
2948 | 2947 | | |
| 2948 | + | |
2949 | 2949 | | |
2950 | 2950 | | |
2951 | 2951 | | |
| |||
0 commit comments