Re: [PATCH v3] unpack_trees: fix breakage when o->src_index != o->dst_index

2018-04-30 Thread Duy Nguyen
On Mon, Apr 30, 2018 at 6:19 PM, Elijah Newren wrote: > Hi Duy, > > On Mon, Apr 30, 2018 at 7:45 AM, Duy Nguyen wrote: >> On Mon, Apr 30, 2018 at 4:42 PM, Duy Nguyen wrote: >>> On Sun, Apr 29, 2018 at 10:53 PM, Johannes Schindelin >>>

Re: [PATCH v3] unpack_trees: fix breakage when o->src_index != o->dst_index

2018-04-30 Thread Elijah Newren
Hi Duy, On Mon, Apr 30, 2018 at 7:45 AM, Duy Nguyen wrote: > On Mon, Apr 30, 2018 at 4:42 PM, Duy Nguyen wrote: >> On Sun, Apr 29, 2018 at 10:53 PM, Johannes Schindelin >> wrote: > @@ -1412,12 +1422,13 @@ int

Re: [PATCH v3] unpack_trees: fix breakage when o->src_index != o->dst_index

2018-04-30 Thread Duy Nguyen
On Mon, Apr 30, 2018 at 4:42 PM, Duy Nguyen wrote: > On Sun, Apr 29, 2018 at 10:53 PM, Johannes Schindelin > wrote: >>> > @@ -1412,12 +1422,13 @@ int unpack_trees(unsigned len, struct tree_desc >>> > *t, struct unpack_trees_options >>> >

Re: [PATCH v3] unpack_trees: fix breakage when o->src_index != o->dst_index

2018-04-30 Thread Duy Nguyen
On Sun, Apr 29, 2018 at 10:53 PM, Johannes Schindelin wrote: >> > @@ -1412,12 +1422,13 @@ int unpack_trees(unsigned len, struct tree_desc >> > *t, struct unpack_trees_options >> > WRITE_TREE_SILENT | >> >

Re: [PATCH v3] unpack_trees: fix breakage when o->src_index != o->dst_index

2018-04-29 Thread Johannes Schindelin
Hi Duy, On Sun, 29 Apr 2018, Duy Nguyen wrote: > On Tue, Apr 24, 2018 at 8:50 AM, Elijah Newren wrote: > > Currently, all callers of unpack_trees() set o->src_index == o->dst_index. > > The code in unpack_trees() does not correctly handle them being different. > > There are

Re: [PATCH v3] unpack_trees: fix breakage when o->src_index != o->dst_index

2018-04-29 Thread Duy Nguyen
On Tue, Apr 24, 2018 at 8:50 AM, Elijah Newren wrote: > Currently, all callers of unpack_trees() set o->src_index == o->dst_index. > The code in unpack_trees() does not correctly handle them being different. > There are two separate issues: > > First, there is the possibility of

[PATCH v3] unpack_trees: fix breakage when o->src_index != o->dst_index

2018-04-24 Thread Elijah Newren
Currently, all callers of unpack_trees() set o->src_index == o->dst_index. The code in unpack_trees() does not correctly handle them being different. There are two separate issues: First, there is the possibility of memory corruption. Since unpack_trees() creates a temporary index in o->result