aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-06-19 17:01:34 -0400
committerMike Frysinger <vapier@gentoo.org>2016-06-19 17:01:34 -0400
commit18961bf5da982bfd7142fcd0fc150cc02dbc4b56 (patch)
treec1495c05a26c282ce870db537cba6f68169f7526
parentpaxmacho: tweak case fall through style (diff)
downloadpax-utils-18961bf5da982bfd7142fcd0fc150cc02dbc4b56.tar.gz
pax-utils-18961bf5da982bfd7142fcd0fc150cc02dbc4b56.tar.bz2
pax-utils-18961bf5da982bfd7142fcd0fc150cc02dbc4b56.zip
scanmacho: check stat return value
-rw-r--r--scanmacho.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/scanmacho.c b/scanmacho.c
index 5a0afd5..30ee730 100644
--- a/scanmacho.c
+++ b/scanmacho.c
@@ -415,7 +415,8 @@ static int scanmacho_file(const char *filename, const struct stat *st_cache)
if (S_ISLNK(st->st_mode)) {
if (!scan_symlink)
return 1;
- stat(filename, &symlink_st);
+ if (stat(filename, &symlink_st))
+ return 1;
st = &symlink_st;
}