Re: [PATCH 1/6] run_external_diff: use an argv_array for the command line

2014-04-19 Thread Jeff King
On Sun, Apr 20, 2014 at 02:09:49AM +0400, Max L wrote: > One more note: at this moment the problem is slightly deeper. This > array is next passed to the execvp function, which now falls with > EFAULT on two my machines (both faced this problem after upgrading to > ubuntu 14.04, everything 'worked

Re: [PATCH 1/6] run_external_diff: use an argv_array for the command line

2014-04-19 Thread Eric Sunshine
On Sat, Apr 19, 2014 at 3:17 PM, Jeff King wrote: > 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. > > Rath

Re: [PATCH 1/6] run_external_diff: use an argv_array for the command line

2014-04-19 Thread Max L
One more note: at this moment the problem is slightly deeper. This array is next passed to the execvp function, which now falls with EFAULT on two my machines (both faced this problem after upgrading to ubuntu 14.04, everything 'worked' fine before, looks like now execvp checks input more strictly)

[PATCH 1/6] run_external_diff: use an argv_array for the command line

2014-04-19 Thread Jeff King
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 an argv_array, which makes