]> git.ipfire.org Git - thirdparty/glibc.git/commit
realpath: Avoid overwriting preexisting error (CVE-2021-3998)
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Mon, 24 Jan 2022 16:06:41 +0000 (21:36 +0530)
committerAurelien Jarno <aurelien@aurel32.net>
Mon, 24 Jan 2022 16:30:16 +0000 (17:30 +0100)
commit41980af2d77ecaef34ef5470dc76f6137279e47f
tree59651b21ac2d160646e812334ec2c844c36655c1
parentbcdde07537d733eafe1f28cea3084003e140f5ff
realpath: Avoid overwriting preexisting error (CVE-2021-3998)

Set errno and failure for paths that are too long only if no other error
occurred earlier.

Related: BZ #28770

Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
(cherry picked from commit 84d2d0fe20bdf94feed82b21b4d7d136db471f03)
stdlib/canonicalize.c