commit: 18961bf5da982bfd7142fcd0fc150cc02dbc4b56
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 19 21:01:34 2016 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jun 19 21:01:34 2016 +0000
URL: https://gitweb.gentoo.org/proj/pax-utils.git/commit/?id=18961bf5
scanmacho: check stat return value
scanmacho.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
}