]> git.ipfire.org Git - thirdparty/glibc.git/commit
realpath: Do not copy result on failure (BZ #28815)
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 21 Feb 2022 02:56:06 +0000 (08:26 +0530)
committerFlorian Weimer <fweimer@redhat.com>
Mon, 20 Jan 2025 14:18:06 +0000 (15:18 +0100)
commit8a82a76a428dd9cba592103fbe0bc0dc556ad68b
tree085ad754ac0bca32235832b4a58134b1c4cc18b4
parente369114462d4340d1b90e25a2475ed5d7b45d373
realpath: Do not copy result on failure (BZ #28815)

On failure, the contents of the resolved buffer passed in by the caller
to realpath are undefined.  Do not copy any partial resolution to the
buffer and also do not test resolved contents in test-canon.c.

Resolves: BZ #28815

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit 949ad78a189194048df8a253bb31d1d11d919044)
NEWS
stdlib/canonicalize.c
stdlib/test-canon.c