2013-09-30 16:29:55 +02:00
|
|
|
--- src/readelf.c
|
|
|
|
+++ src/readelf.c 2013-09-30 13:41:16.000000000 +0000
|
|
|
|
@@ -708,7 +708,7 @@ core:
|
2006-12-19 00:15:53 +01:00
|
|
|
default:
|
2011-06-14 19:53:47 +02:00
|
|
|
if (xnh_type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
|
2013-09-30 16:29:55 +02:00
|
|
|
/*###709 [cc] warning: declaration of 'i' shadows previous non-variable%%%*/
|
2006-12-19 00:15:53 +01:00
|
|
|
- size_t i, j;
|
|
|
|
+ size_t i, j, m = 0;
|
|
|
|
unsigned char c;
|
|
|
|
/*
|
|
|
|
* Extract the program name. We assume
|
2013-09-30 16:29:55 +02:00
|
|
|
@@ -720,7 +720,9 @@ core:
|
2006-12-19 00:15:53 +01:00
|
|
|
* 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++) {
|
2008-04-14 19:32:36 +02:00
|
|
|
unsigned char *cname, *cp;
|
2006-12-19 00:15:53 +01:00
|
|
|
size_t reloffset = prpsoffsets(i);
|
|
|
|
size_t noffset = doff + reloffset;
|