Dirk Mueller
2f9edeb10a
* Add octal indirect magic * avoid infinite loop in non-wide code * Obey MAGIC_CONTINUE with multiple magic files * Fix bug with large flist * PR/364: Detect non-nul-terminated core filenames from QEMU * PR/359: Add support for http://ndjson.org/ * PR/362: Fix wide printing * PR/358: Fix width for -f - - drop file-boo1201350.patch (upstream) OBS-URL: https://build.opensuse.org/package/show/Base:System/file?expand=0&rev=254
29 lines
823 B
Plaintext
29 lines
823 B
Plaintext
---
|
|
src/readelf.c | 6 ++++--
|
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
|
Index: src/readelf.c
|
|
===================================================================
|
|
--- src/readelf.c.orig
|
|
+++ src/readelf.c
|
|
@@ -825,7 +825,7 @@ do_core_note(struct magic_set *ms, unsig
|
|
|
|
default:
|
|
if (type == NT_PRPSINFO && *flags & FLAGS_IS_CORE) {
|
|
- size_t i, j;
|
|
+ size_t i, j, m = 0;
|
|
unsigned char c;
|
|
/*
|
|
* Extract the program name. We assume
|
|
@@ -837,7 +837,9 @@ do_core_note(struct magic_set *ms, unsig
|
|
* 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;
|