diff --git a/Fix-segfault-in-eu-ar-m.patch b/Fix-segfault-in-eu-ar-m.patch new file mode 100644 index 0000000000000000000000000000000000000000..9667644264da1b1ebf1c9450afe9906853f61bfb --- /dev/null +++ b/Fix-segfault-in-eu-ar-m.patch @@ -0,0 +1,34 @@ +From 7170b990d3dc3974b8e670b3c0e4ca6dcc20c853 Mon Sep 17 00:00:00 2001 +From: xiezhipeng +Date: Wed, 8 Dec 2021 09:47:36 +0800 +Subject: [PATCH] fix segfault in eu-ar -m + +Fix segfaultineu-ar-m. + +--- + src/ar.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/ar.c b/src/ar.c +index ab6098f..ed5fe2f 100644 +--- a/src/ar.c ++++ b/src/ar.c +@@ -1159,6 +1159,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc, + goto next; + + struct armem *newp = alloca (sizeof (struct armem)); ++ memset (newp, '\0', sizeof(struct armem)); + newp->old_off = elf_getaroff (subelf); + newp->size = arhdr->ar_size; + newp->sec = arhdr->ar_date; +@@ -1251,6 +1252,7 @@ do_oper_insert (int oper, const char *arfname, char **argv, int argc, + if (found[cnt] == NULL) + { + found[cnt] = alloca (sizeof (struct armem)); ++ memset (found[cnt], '\0', sizeof(struct armem)); + found[cnt]->old_off = -1; + + remember_long_name (found[cnt], bname, bnamelen); +-- +2.27.0 + diff --git a/elfutils.spec b/elfutils.spec index 440ffcfb248ddf473e6f53814737ff7d0ccb1dbd..359df828ff0a0f48649bb08a3905fb6c36713b45 100644 --- a/elfutils.spec +++ b/elfutils.spec @@ -1,13 +1,14 @@ # -*- rpm-spec from http://elfutils.org/ -*- Name: elfutils Version: 0.185 -Release: 5 +Release: 6 Summary: A collection of utilities and DSOs to handle ELF files and DWARF data URL: http://elfutils.org/ License: GPLv3+ and (GPLv2+ or LGPLv3+) Source: ftp://sourceware.org/pub/elfutils/%{version}/elfutils-%{version}.tar.bz2 Patch0: eu-elfclassify-no-stdin-should-use-classify_flag_no_stdin.patch +Patch1: Fix-segfault-in-eu-ar-m.patch Provides: elfutils-libelf elfutils-default-yama-scope default-yama-scope elfutils-libs Obsoletes: elfutils-libelf elfutils-default-yama-scope elfutils-libs @@ -237,6 +238,9 @@ exit 0 %systemd_postun_with_restart debuginfod.service %changelog +* Mon Jun 27 2022 zhangruifang - 0.185-6 +- fix segfault in eu-ar -m + * Tue Mar 15 2022 zoulin - 0.185-5 - fix (obs) project build fail