[dpkg] 179/200: Dpkg::Shlibs::Objdump: Do not parse bogus ELF binaries in get_format()
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:17:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository dpkg.
commit 952326db379555e0f3241806a40e12cda3d8a205
Author: Guillem Jover <guillem at debian.org>
Date: Sun Feb 12 01:31:25 2017 +0100
Dpkg::Shlibs::Objdump: Do not parse bogus ELF binaries in get_format()
If the ELF class or endianness are unknown or bogus, ignore the file.
Reported-by: Niels Thykier <niels at thykier.net>
---
debian/changelog | 2 ++
scripts/Dpkg/Shlibs/Objdump.pm | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index d32a00c..9e4e1ff 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -10,6 +10,8 @@ dpkg (1.18.23) UNRELEASED; urgency=medium
gracefully ignore non-ELF files again. Closes: #854536
- Emit an explicit warning from Dpkg::Shlibs::Objdump::Object::analyze()
for unknown executable formats instead of relying on objdump doing so.
+ - Do not parse bogus ELF binaries in Dpkg::Shlibs::Objdump::get_format().
+ Reported by Niels Thykier <niels at thykier.net>.
* Documentation:
- Clarify the requirements for deb-conffile(5) pathnames. Closes: #854417
Proposed by Dieter Adriaenssens <dieter.adriaenssens at gmail.com>.
diff --git a/scripts/Dpkg/Shlibs/Objdump.pm b/scripts/Dpkg/Shlibs/Objdump.pm
index 7eaac2e..91cc064 100644
--- a/scripts/Dpkg/Shlibs/Objdump.pm
+++ b/scripts/Dpkg/Shlibs/Objdump.pm
@@ -201,14 +201,14 @@ sub get_format {
$elf_word = 'L';
} elsif ($elf{bits} == ELF_BITS_64) {
$elf_word = 'Q';
- } elsif ($elf{bits} == ELF_BITS_NONE) {
+ } else {
return;
}
if ($elf{endian} == ELF_ORDER_2LSB) {
$elf_endian = '<';
} elsif ($elf{endian} == ELF_ORDER_2MSB) {
$elf_endian = '>';
- } elsif ($elf{endian} == ELF_ORDER_NONE) {
+ } else {
return;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list