Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-projects commit in pax-utils: paxelf.c
Date: Sat, 24 Nov 2012 19:32:24
Message-Id: 20121124193209.D3D9B20C65@flycatcher.gentoo.org
1 vapier 12/11/24 19:32:09
2
3 Modified: paxelf.c
4 Log:
5 scanelf: skip leading OLFOSABI_ when getting the osabi field so we do not skip UNKNOWN_TYPE
6
7 Revision Changes Path
8 1.75 pax-utils/paxelf.c
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/paxelf.c?rev=1.75&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/paxelf.c?rev=1.75&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-projects/pax-utils/paxelf.c?r1=1.74&r2=1.75
13
14 Index: paxelf.c
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v
17 retrieving revision 1.74
18 retrieving revision 1.75
19 diff -u -r1.74 -r1.75
20 --- paxelf.c 18 Nov 2012 07:39:45 -0000 1.74
21 +++ paxelf.c 24 Nov 2012 19:32:09 -0000 1.75
22 @@ -1,7 +1,7 @@
23 /*
24 * Copyright 2003-2012 Gentoo Foundation
25 * Distributed under the terms of the GNU General Public License v2
26 - * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.74 2012/11/18 07:39:45 vapier Exp $
27 + * $Header: /var/cvsroot/gentoo-projects/pax-utils/paxelf.c,v 1.75 2012/11/24 19:32:09 vapier Exp $
28 *
29 * Copyright 2005-2012 Ned Ludd - <solar@g.o>
30 * Copyright 2005-2012 Mike Frysinger - <vapier@g.o>
31 @@ -150,10 +150,9 @@
32 const char *get_elfosabi(elfobj *elf)
33 {
34 const char *str = get_elfeitype(EI_OSABI, elf->data[EI_OSABI]);
35 - if (str)
36 - if (strlen(str) > 9)
37 - return str + 9;
38 - return "";
39 + if (strncmp(str, "ELFOSABI_", 9) == 0)
40 + str += 9;
41 + return str;
42 }
43
44 void print_etypes(FILE *stream)