Re: [Rd] [PATCH] Fix bad free in connections

2017-07-21 Thread Steve Grubb
On Friday, July 21, 2017 5:03:09 AM EDT Martin Morgan wrote: > b gets reallocated when > > res = vasprintf(&b, format, ap); > > is successful and res >= 0. usedVasprintf is then set to TRUE, and > free(b) called. > > It seems like the code is correct as written? Yes, I think I see the issu

Re: [Rd] [PATCH] Fix bad free in connections

2017-07-21 Thread Martin Morgan
On 07/20/2017 05:04 PM, Steve Grubb wrote: Hello, There are times when b points to buf which is a stack variable. This leads to a bad free. The current test actually guarantees the stack will try to get freed. Simplest to just drop the variable and directly test if b should get freed. Signed-o

[Rd] [PATCH] Fix bad free in connections

2017-07-20 Thread Steve Grubb
Hello, There are times when b points to buf which is a stack variable. This leads to a bad free. The current test actually guarantees the stack will try to get freed. Simplest to just drop the variable and directly test if b should get freed. Signed-off-by: Steve Grubb Index: src/main/connec