This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=cb4e153bc9694f49df1ddd296d34c5fe52393142 commit cb4e153bc9694f49df1ddd296d34c5fe52393142 Author: Guillem Jover <[email protected]> AuthorDate: Sat Nov 26 01:25:40 2022 +0100 Dpkg::Shlibs: Handle unknown executable file formats If the Dpkg::Shlibs::Objdump::get_format() fails due to missing file, I/O errors, the executable not being an ELF file, mismatched ELF version, unknown ELF bits or endianness, then the function will return an undefined value. We need to fix the call site to cope with it, otherwise we get perl warnings about uninitialized variables being used. Reported-by: Helmut Grohne <[email protected]> (on IRC) --- scripts/Dpkg/Shlibs.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/Dpkg/Shlibs.pm b/scripts/Dpkg/Shlibs.pm index 2b19d14a7..22fecc45b 100644 --- a/scripts/Dpkg/Shlibs.pm +++ b/scripts/Dpkg/Shlibs.pm @@ -168,7 +168,9 @@ sub find_library { my $checkdir = "$root$dir"; if (-e "$checkdir/$lib") { my $libformat = Dpkg::Shlibs::Objdump::get_format("$checkdir/$lib"); - if ($format eq $libformat) { + if (not defined $libformat) { + warning(g_("unknown executable format in file '%s'"), "$checkdir/$lib"); + } elsif ($format eq $libformat) { push @libs, canonpath("$checkdir/$lib"); } else { debug(1, "Skipping lib $checkdir/$lib, libabi=0x%s != objabi=0x%s", -- Dpkg.Org's dpkg

