Compare commits

...
Sign in to create a new pull request.

3 commits

Author SHA1 Message Date
Nick Clifton
34820610fe NVR bump to allow rebuild against new gcc 2020-04-09 11:19:20 +01:00
Nick Clifton
37c50d87ce Annocheck: Fix a division by zero error when parsing GO binaries.
Resolves: #1818863
2020-03-30 17:05:46 +01:00
Nick Clifton
d3d51173a5 NVR bump in order to allow rebuilding against latest version of gcc. 2019-09-04 10:18:31 +01:00
2 changed files with 27 additions and 2 deletions

View file

@ -0,0 +1,16 @@
diff -rup annobin.orig/annocheck/hardened.c annobin-8.78/annocheck/hardened.c
--- annobin.orig/annocheck/hardened.c 2020-03-30 17:00:15.839126957 +0100
+++ annobin-8.78/annocheck/hardened.c 2020-03-30 17:00:55.219802988 +0100
@@ -1246,6 +1246,12 @@ static bool
check_dynamic_section (annocheck_data * data,
annocheck_section * sec)
{
+ if (sec->shdr.sh_size == 0 || sec->shdr.sh_entsize == 0)
+ {
+ einfo (VERBOSE, "%s: WARN: Dynamic section %s is empty - ignoring", data->filename, sec->secname);
+ return true;
+ }
+
size_t num_entries = sec->shdr.sh_size / sec->shdr.sh_entsize;
if (tests[TEST_DYNAMIC].num_pass == 0)

View file

@ -2,7 +2,7 @@
Name: annobin
Summary: Binary annotation plugin for GCC
Version: 8.78
Release: 1%{?dist}
Release: 4%{?dist}
License: GPLv3+
URL: https://fedoraproject.org/wiki/Toolchain/Watermark
@ -40,7 +40,7 @@ Source: https://nickc.fedorapeople.org/annobin-%{version}.tar.xz
# For the latest sources use: git clone git://sourceware.org/git/annobin.git
# Insert patches here, if needed.
# Patch01: annobin-xxx.patch
Patch01: annobin-divide-by-zero.patch
#---------------------------------------------------------------------------------
@ -220,6 +220,15 @@ fi
#---------------------------------------------------------------------------------
%changelog
* Thu Apr 09 2020 Nick Clifton <nickc@redhat.com> - 8.78-4
- NVR bump to allow rebuild against new gcc.
* Mon Mar 30 2020 Nick Clifton <nickc@redhat.com> - 8.78-3
- Annocheck: Fix a division by zero error when parsing GO binaries. (#1818863)
* Wed Sep 04 2019 Nick Clifton <nickc@redhat.com> - 8.78-2
- NVR bump in order to allow rebuilding against latest version of gcc.
* Tue Aug 06 2019 Nick Clifton <nickc@redhat.com> - 8.78-1
- Fix a memory allocation error in the annobin plugin. (#1737306)