summaryrefslogtreecommitdiffstats
path: root/contrib/file/src
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/file/src')
-rw-r--r--contrib/file/src/readelf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/file/src/readelf.c b/contrib/file/src/readelf.c
index bc6e7f6..9631591 100644
--- a/contrib/file/src/readelf.c
+++ b/contrib/file/src/readelf.c
@@ -1052,7 +1052,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
/* Things we can determine when we seek */
switch (xsh_type) {
case SHT_NOTE:
- if (xsh_size + xsh_offset > (uintmax_t)fsize) {
+ if (xsh_size + (uintmax_t)xsh_offset > (uintmax_t)fsize) {
if (file_printf(ms,
", note offset/size 0x%jx+0x%jx exceeds"
" file size 0x%jx", (uintmax_t)xsh_offset,
OpenPOWER on IntegriCloud