fix debug info reversed logic

This commit is contained in:
Kamil Dudka 2017-02-14 13:45:59 +01:00
parent 0f21f45ef7
commit c1cb4b3a51
2 changed files with 34 additions and 1 deletions

View File

@ -0,0 +1,27 @@
From 74f951c91cccc82366b6e504cc10ee2990578cc4 Mon Sep 17 00:00:00 2001
From: Christos Zoulas <christos@zoulas.com>
Date: Sat, 11 Feb 2017 18:12:03 +0000
Subject: [PATCH] fix debug info reversed logic
Upstream-commit: ee13402cb538509f4594a1ebaabc28b7d511c247
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
---
src/readelf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/readelf.c b/src/readelf.c
index 4520148..d1b71cf 100644
--- a/src/readelf.c
+++ b/src/readelf.c
@@ -1185,7 +1185,7 @@ doshn(struct magic_set *ms, int clazz, int swap, int fd, off_t off, int num,
{
Elf32_Shdr sh32;
Elf64_Shdr sh64;
- int stripped = 1, has_debug_info = 1;
+ int stripped = 1, has_debug_info = 0;
size_t nbadcap = 0;
void *nbuf;
off_t noff, coff, name_off;
--
2.7.4

View File

@ -5,7 +5,7 @@
Summary: A utility for determining file types
Name: file
Version: 5.30
Release: 1%{?dist}
Release: 2%{?dist}
License: BSD
Group: Applications/File
Source0: ftp://ftp.astron.com/pub/file/file-%{version}.tar.gz
@ -25,6 +25,9 @@ Patch14: file-5.19-cafebabe.patch
Patch15: file-5.22-awk-perl.patch
Patch17: file-5.24-varied.patch
# picked from upstream
Patch18: file-5.30-fix-debug-info-reversed-logic.patch
URL: http://www.darwinsys.com/file/
Requires: file-libs = %{version}-%{release}
BuildRequires: zlib-devel
@ -189,6 +192,9 @@ cd %{py3dir}
%endif
%changelog
* Tue Feb 14 2017 Kamil Dudka <kdudka@redhat.com> - 5.30-2
- fix debug info reversed logic
* Mon Feb 13 2017 Kamil Dudka <kdudka@redhat.com> - 5.30-1
- apply patches automatically to ease maintenance
- update to new version 5.30