]> 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)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 21 Feb 2022 02:56:33 +0000 (08:26 +0530)
commit949ad78a189194048df8a253bb31d1d11d919044
treec4d2f8a544581a91225839aa8cfd67ddced94028
parentb98d0bbf747f39770e0caba7e984ce9f8f900330
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>
stdlib/canonicalize.c
stdlib/test-canon.c