Re: [HACKERS] REL9_6_STABLE - a minor bug in src/common/exec.c

2018-01-18 Thread Michael Paquier
On Thu, Jan 18, 2018 at 03:27:43PM +0300, Anna Akenteva wrote: > Would it be possible to fix it the same way in REL9_6_STABLE and maybe other > older versions too? Yes, this was part of an investigation that led to 052cc223 to improve OOM handling, which involved way more code paths than just this

Re: [HACKERS] REL9_6_STABLE - a minor bug in src/common/exec.c

2018-01-18 Thread Anna Akenteva
After checking some code from REL9_6_STABLE with a static analyzer, I've found this bit: src/common/exec.c:586 putenv(strdup(env_path)); ... src/common/exec.c:597 putenv(strdup(env_path)); Theoretically, strdup might return NULL, and we'll send NULL as an argument to putenv