projects
/
file
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cd752e7
)
check against -1 to appease coverity.
author
Christos Zoulas
<christos@zoulas.com>
Wed, 1 Aug 2018 09:56:24 +0000
(09:56 +0000)
committer
Christos Zoulas
<christos@zoulas.com>
Wed, 1 Aug 2018 09:56:24 +0000
(09:56 +0000)
src/readelf.c
patch
|
blob
|
history
diff --git
a/src/readelf.c
b/src/readelf.c
index 2bcbc59dd3472f8dd70c5cdb4ab1aa754584cffd..5dfcea544889f130c50ae55c93f64c4f6423e725 100644
(file)
--- a/
src/readelf.c
+++ b/
src/readelf.c
@@
-27,7
+27,7
@@
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: readelf.c,v 1.14
6 2018/07/27 07:50:1
4 christos Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.14
7 2018/08/01 09:56:2
4 christos Exp $")
#endif
#ifdef BUILTIN_ELF
@@
-1716,7
+1716,7
@@
file_tryelf(struct magic_set *ms, const struct buffer *b)
&& (errno == ESPIPE))
fd = file_pipe2file(ms, fd, buf, nbytes);
- if (fstat(fd, &st) == -1) {
+ if (f
d == -1 || f
stat(fd, &st) == -1) {
file_badread(ms);
return -1;
}