From: Shu-Chun Weng Date: Mon, 3 May 2021 23:47:10 +0000 (-0700) Subject: Don't crash if /var/tmp doesn't exist X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8238afcd89abe20989becb1a3836291a0f8b67dd;p=thirdparty%2Fglibc.git Don't crash if /var/tmp doesn't exist `xstat` is checked `stat64` crashing the program if the latter returns failure. In this loop, we are trying to find one folder that satisfies the condition, no reason to crash the program if one folder doesn't. --- diff --git a/io/tst-copy_file_range.c b/io/tst-copy_file_range.c index 3d531a19370..38763328d38 100644 --- a/io/tst-copy_file_range.c +++ b/io/tst-copy_file_range.c @@ -759,8 +759,7 @@ do_test (void) } struct stat64 cstat; - xstat (path, &cstat); - if (cstat.st_dev == instat.st_dev) + if (stat (path, &cstat) != 0 || cstat.st_dev == instat.st_dev) { free (to_free); continue;