Re: [PATCH] bisect: avoid NULL pointer dereference

2018-01-08 Thread Junio C Hamano
René Scharfe writes: > 7c117184d7 (bisect: fix off-by-one error in `best_bisection_sorted()`) > fixed an off-by-one error, plugged a memory leak and removed a NULL > check. However, the pointer p *is* actually NULL if an empty list is > passed to the function. Let's add the check

Re: [PATCH] bisect: avoid NULL pointer dereference

2018-01-08 Thread René Scharfe
Hello Dscho, Am 08.01.2018 um 21:45 schrieb Johannes Schindelin: > Isn't this identical to > https://public-inbox.org/git/20180103184852.27271-1-ava...@gmail.com/ ? yes, indeed, thanks. So here's an upvote for Ævar's patch then. :) (I should have sent it earlier, but was not fully convinced it

Re: [PATCH] bisect: avoid NULL pointer dereference

2018-01-08 Thread Johannes Schindelin
Hi René, On Mon, 8 Jan 2018, René Scharfe wrote: > 7c117184d7 (bisect: fix off-by-one error in `best_bisection_sorted()`) > fixed an off-by-one error, plugged a memory leak and removed a NULL > check. However, the pointer p *is* actually NULL if an empty list is > passed to the function. Let's

[PATCH] bisect: avoid NULL pointer dereference

2018-01-08 Thread René Scharfe
7c117184d7 (bisect: fix off-by-one error in `best_bisection_sorted()`) fixed an off-by-one error, plugged a memory leak and removed a NULL check. However, the pointer p *is* actually NULL if an empty list is passed to the function. Let's add the check back for safety. Bisecting nothing doesn't