]> git.ipfire.org Git - thirdparty/shadow.git/commit
Fix use-after-free of pointer after realloc(3)
authorAlejandro Colomar <alx@kernel.org>
Sat, 4 Feb 2023 23:01:13 +0000 (00:01 +0100)
committerSerge Hallyn <serge@hallyn.com>
Fri, 24 Feb 2023 02:28:43 +0000 (20:28 -0600)
commit7668f77439b6cc1116cab075dfa4184b2076ada0
treeae5ddae0f515de69edc3bf7ec387df267c3114c9
parentefbbcade43ff2dca2b7a271dcbd186be08ac1913
Fix use-after-free of pointer after realloc(3)

We can't use a pointer that was input to realloc(3), nor any pointers
that point to reallocated memory, without making sure that the memory
wasn't moved.  If we do, the Behavior is Undefined.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
libmisc/env.c