SHA256
3
0
forked from pool/file
file/file-5.07-elf.dif
2013-09-30 14:29:55 +00:00

23 lines
692 B
Plaintext

--- src/readelf.c
+++ src/readelf.c 2013-09-30 13:41:16.000000000 +0000
@@ -708,7 +708,7 @@ core:
default:
if (xnh_type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
/*###709 [cc] warning: declaration of 'i' shadows previous non-variable%%%*/
- size_t i, j;
+ size_t i, j, m = 0;
unsigned char c;
/*
* Extract the program name. We assume
@@ -720,7 +720,9 @@ core:
* If the characters aren't all printable,
* reject it.
*/
- for (i = 0; i < NOFFSETS; i++) {
+ if (os_style == OS_STYLE_SVR4)
+ m = 1;
+ for (i = m; i < NOFFSETS; i++) {
unsigned char *cname, *cp;
size_t reloffset = prpsoffsets(i);
size_t noffset = doff + reloffset;