0.178-8 - Add elfutils-0.178-gcc10-null-dereference.patch
This commit is contained in:
parent
336454e1d3
commit
b001d1d274
38
elfutils-0.178-gcc10-null-dereference.patch
Normal file
38
elfutils-0.178-gcc10-null-dereference.patch
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/libdwfl/linux-kernel-modules.c b/libdwfl/linux-kernel-modules.c
|
||||
index 48fb1ff0..0434f1e5 100644
|
||||
--- a/libdwfl/linux-kernel-modules.c
|
||||
+++ b/libdwfl/linux-kernel-modules.c
|
||||
@@ -176,9 +176,10 @@ find_kernel_elf (Dwfl *dwfl, const char *release, char **fname)
|
||||
{
|
||||
/* First try to find an uncompressed vmlinux image. Possibly
|
||||
including debuginfo. */
|
||||
- if ((release[0] == '/'
|
||||
- ? asprintf (fname, "%s/vmlinux", release)
|
||||
- : asprintf (fname, "/boot/vmlinux-%s", release)) < 0)
|
||||
+ if (release == NULL
|
||||
+ || ((release[0] == '/'
|
||||
+ ? asprintf (fname, "%s/vmlinux", release)
|
||||
+ : asprintf (fname, "/boot/vmlinux-%s", release)) < 0))
|
||||
return -1;
|
||||
|
||||
int fd = try_kernel_name (dwfl, fname, true);
|
||||
@@ -241,6 +242,9 @@ report_kernel (Dwfl *dwfl, const char **release,
|
||||
if (unlikely (result != 0))
|
||||
return result;
|
||||
|
||||
+ if (release == NULL || *release == NULL)
|
||||
+ return EINVAL;
|
||||
+
|
||||
char *fname;
|
||||
int fd = find_kernel_elf (dwfl, *release, &fname);
|
||||
|
||||
@@ -296,6 +300,9 @@ report_kernel_archive (Dwfl *dwfl, const char **release,
|
||||
if (unlikely (result != 0))
|
||||
return result;
|
||||
|
||||
+ if (release == NULL || *release == NULL)
|
||||
+ return EINVAL;
|
||||
+
|
||||
char *archive;
|
||||
int res = (((*release)[0] == '/')
|
||||
? asprintf (&archive, "%s/debug.a", *release)
|
@ -1,6 +1,6 @@
|
||||
Name: elfutils
|
||||
Version: 0.178
|
||||
%global baserelease 7
|
||||
%global baserelease 8
|
||||
Release: %{baserelease}%{?dist}
|
||||
URL: http://elfutils.org/
|
||||
%global source_url ftp://sourceware.org/pub/elfutils/%{version}/
|
||||
@ -60,6 +60,7 @@ Patch3: elfutils-0.178-curl-code-gcc-10.patch
|
||||
Patch4: elfutils-0.178-compressed-vmlinuz.patch
|
||||
Patch5: elfutils-0.178-debuginfod-timeoutprogress.patch
|
||||
Patch6: elfutils-0.178-libasm-ebl.patch
|
||||
Patch7: elfutils-0.178-gcc10-null-dereference.patch
|
||||
|
||||
%description
|
||||
Elfutils is a collection of utilities, including stack (to show
|
||||
@ -257,6 +258,7 @@ such servers to download those files on demand.
|
||||
%patch4 -p1 -b .vmlinuz
|
||||
%patch5 -p1 -b .debuginfod-timeout-progress
|
||||
%patch6 -p1 -b .libasm-ebl
|
||||
%patch7 -p1 -b .null-deref-10
|
||||
|
||||
# In case the above patches added any new test scripts, make sure they
|
||||
# are executable.
|
||||
@ -434,6 +436,10 @@ exit 0
|
||||
%systemd_postun_with_restart debuginfod.service
|
||||
|
||||
%changelog
|
||||
|
||||
* Fri Jan 24 2020 Mark Wielaard <mjw@fedoraproject.org> - 0.178-8
|
||||
- Add elfutils-0.178-gcc10-null-dereference.patch
|
||||
|
||||
* Fri Jan 10 2020 Mark Wielaard <mjw@fedoraproject.org> - 0.178-7
|
||||
- Add elfutils-0.178-debuginfod-timeoutprogress.patch
|
||||
- Add elfutils-0.178-libasm-ebl.patch
|
||||
|
Loading…
Reference in New Issue
Block a user