]> granicus.if.org Git - file/commitdiff
Don't lose the last hardware capacity. Cheng Renquan <crquan@gmail.com>
authorChristos Zoulas <christos@zoulas.com>
Wed, 13 May 2009 14:43:10 +0000 (14:43 +0000)
committerChristos Zoulas <christos@zoulas.com>
Wed, 13 May 2009 14:43:10 +0000 (14:43 +0000)
src/readelf.c

index 16955d1ea7d93b69a57dc7b06ee08cc05c4d3d1b..0e8b9a6ba21a913463490317bc8d55351dcb0198 100644 (file)
@@ -27,7 +27,7 @@
 #include "file.h"
 
 #ifndef lint
-FILE_RCSID("@(#)$File: readelf.c,v 1.81 2008/11/04 16:38:28 christos Exp $")
+FILE_RCSID("@(#)$File: readelf.c,v 1.82 2009/05/08 17:41:59 christos Exp $")
 #endif
 
 #ifdef BUILTIN_ELF
@@ -909,7 +909,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
                                Elf64_Cap cap64;
                                char cbuf[/*CONSTCOND*/
                                    MAX(sizeof cap32, sizeof cap64)];
-                               if ((coff += xcap_sizeof) >= (off_t)xsh_size)
+                               if ((coff += xcap_sizeof) > (off_t)xsh_size)
                                        break;
                                if (read(fd, cbuf, (size_t)xcap_sizeof) !=
                                    (ssize_t)xcap_sizeof) {