Accepting request 20719 from Base:System
Copy from Base:System/ptools based on submit request 20719 from user janblunck OBS-URL: https://build.opensuse.org/request/show/20719 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ptools?expand=0&rev=3
This commit is contained in:
commit
c70619426a
33
commit-a42a099
Normal file
33
commit-a42a099
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
commit a42a0991797ab10c04bbcdf7cc2846c5da5bbd25
|
||||||
|
Author: Jan Blunck <jblunck@suse.de>
|
||||||
|
Date: Mon Sep 21 17:57:02 2009 +0200
|
||||||
|
|
||||||
|
Fix crash in map_seach_ehdr()
|
||||||
|
|
||||||
|
When searching for the ELF header check if libelf returned a valid pointer
|
||||||
|
before referencing it.
|
||||||
|
|
||||||
|
https://crashdb.opensuse.org/log/show/b75d1730f4c944b092afd8f302fe76b7
|
||||||
|
|
||||||
|
Signed-off-by: Jan Blunck <jblunck@suse.de>
|
||||||
|
|
||||||
|
---
|
||||||
|
src/pbuildid.c | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
Index: b/src/pbuildid.c
|
||||||
|
===================================================================
|
||||||
|
--- a/src/pbuildid.c
|
||||||
|
+++ b/src/pbuildid.c
|
||||||
|
@@ -467,6 +467,11 @@ static Elf *map_search_ehdr(struct core_
|
||||||
|
/* Look for ELF header in this LOAD segment */
|
||||||
|
data = elf_getdata_rawchunk (map->elf, map->p_offset,
|
||||||
|
map->p_filesz, ELF_T_EHDR);
|
||||||
|
+ if (!data) {
|
||||||
|
+ fprintf(stderr, "Couldn't read LOAD segment: %s\n",
|
||||||
|
+ elf_errmsg(-1));
|
||||||
|
+ return NULL;
|
||||||
|
+ }
|
||||||
|
e_ident = (unsigned char *)data->d_buf;
|
||||||
|
if (memcmp (e_ident, ELFMAG, SELFMAG) != 0
|
||||||
|
|| e_ident[EI_CLASS] <= ELFCLASSNONE
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Sep 21 17:59:50 CEST 2009 - jblunck@suse.de
|
||||||
|
|
||||||
|
- Fix crash in map_seach_ehdr().
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Feb 3 10:37:08 CET 2009 - jblunck@suse.de
|
Tue Feb 3 10:37:08 CET 2009 - jblunck@suse.de
|
||||||
|
|
||||||
|
@ -21,11 +21,12 @@ Url: ftp://ftp.suse.com/pub/people/jblunck/ptools/
|
|||||||
Name: ptools
|
Name: ptools
|
||||||
Summary: The process tools collection
|
Summary: The process tools collection
|
||||||
Version: 0.1
|
Version: 0.1
|
||||||
Release: 3
|
Release: 4
|
||||||
License: GPL v2 or later
|
License: GPL v2 or later
|
||||||
Group: Development/Tools/Debuggers
|
Group: Development/Tools/Debuggers
|
||||||
Source: %{name}-%{version}.tar.bz2
|
Source: %{name}-%{version}.tar.bz2
|
||||||
Patch0: output-l_addr.diff
|
Patch0: output-l_addr.diff
|
||||||
|
Patch1: commit-a42a099
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: libelf-devel popt-devel
|
BuildRequires: libelf-devel popt-devel
|
||||||
AutoReqProv: on
|
AutoReqProv: on
|
||||||
@ -44,6 +45,7 @@ Authors:
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure
|
%configure
|
||||||
|
Loading…
Reference in New Issue
Block a user