From 5e5c35e3d3875afec2859c8c5cad38e153894c14 Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Wed, 23 Dec 2020 13:58:54 +0800 Subject: [PATCH 1/2] [patch tracking] 20201223135849737672 - https://github.com/crash-utility/crash/commit/31ca172357c4d3520caf29b9efb5e6ccd622aae9 --- ...172357c4d3520caf29b9efb5e6ccd622aae9.patch | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 31ca172357c4d3520caf29b9efb5e6ccd622aae9.patch diff --git a/31ca172357c4d3520caf29b9efb5e6ccd622aae9.patch b/31ca172357c4d3520caf29b9efb5e6ccd622aae9.patch new file mode 100644 index 0000000..191dbf7 --- /dev/null +++ b/31ca172357c4d3520caf29b9efb5e6ccd622aae9.patch @@ -0,0 +1,39 @@ +diff --git a/netdump.c b/netdump.c +index c76d9dd..ca9b459 100644 +--- a/netdump.c ++++ b/netdump.c +@@ -119,7 +119,8 @@ is_netdump(char *file, ulong source_query) + Elf64_Phdr *load64; + char *eheader, *sect0; + char buf[BUFSIZE]; +- size_t size, len, tot; ++ ssize_t size; ++ size_t len, tot; + Elf32_Off offset32; + Elf64_Off offset64; + ulong format; +@@ -134,7 +135,7 @@ is_netdump(char *file, ulong source_query) + + size = SAFE_NETDUMP_ELF_HEADER_SIZE; + if ((eheader = (char *)malloc(size)) == NULL) { +- fprintf(stderr, "cannot malloc minimum ELF header buffer\n"); ++ fprintf(stderr, "cannot malloc ELF header buffer\n"); + clean_exit(1); + } + +@@ -142,10 +143,14 @@ is_netdump(char *file, ulong source_query) + if (!read_flattened_format(fd, 0, eheader, size)) + goto bailout; + } else { +- if (read(fd, eheader, size) != size) { ++ size = read(fd, eheader, size); ++ if (size < 0) { + sprintf(buf, "%s: ELF header read", file); + perror(buf); + goto bailout; ++ } else if (size < MIN_NETDUMP_ELF_HEADER_SIZE) { ++ fprintf(stderr, "%s: file too small!\n", file); ++ goto bailout; + } + } + -- Gitee From d75cbfa391e0b71e3c03dfee2de9363d508a9d5a Mon Sep 17 00:00:00 2001 From: openeuler-ci-bot <80474298@qq.com> Date: Wed, 23 Dec 2020 13:58:55 +0800 Subject: [PATCH 2/2] [patch tracking] 20201223135849737672 - update spec file --- crash.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crash.spec b/crash.spec index 6048d78..b590bc7 100644 --- a/crash.spec +++ b/crash.spec @@ -1,6 +1,6 @@ Name: crash Version: 7.2.8 -Release: 4 +Release: 5 Summary: Linux kernel crash utility. License: GPLv3 URL: https://crash-utility.github.io @@ -12,6 +12,7 @@ Patch1: use_system_readline_v3.patch Patch9000: add-SDEI-stack-resolution.patch Patch9001: fix-bitmap_len-calculation-overflow-problem-in-large.patch +Patch9002: 31ca172357c4d3520caf29b9efb5e6ccd622aae9.patch BuildRequires: ncurses-devel zlib-devel lzo-devel snappy-devel BuildRequires: gcc gcc-c++ bison readline-devel @@ -77,6 +78,9 @@ install -D -m 0644 defs.h %{buildroot}%{_includedir}/%{name}/defs.h %{_mandir}/man8/crash.8* %changelog +* 20201223135849737672 patch-tracking 7.2.8-5 +- append patch file of upstream repository from <31ca172357c4d3520caf29b9efb5e6ccd622aae9> to <31ca172357c4d3520caf29b9efb5e6ccd622aae9> + * Sat Dec 12 2020 shixuantong - 7.2.8-4 - Update Source0, URL, add Source1 and update tarball from upstream release @@ -96,4 +100,4 @@ install -D -m 0644 defs.h %{buildroot}%{_includedir}/%{name}/defs.h - Package rebuild. * Fri Aug 30 2019 openEuler Buildteam - 7.2.6-1 -- Package init. +- Package init. \ No newline at end of file -- Gitee