!29 Fix fuzz failure
From: @zou_lin77 Reviewed-by: @overweight Signed-off-by: @overweight
This commit is contained in:
commit
c9db1d4bf2
31
Fix-a-potential-use-of-an-uninitialised-value-in-the.patch
Normal file
31
Fix-a-potential-use-of-an-uninitialised-value-in-the.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 151f5de4a6548cd83a79b4705f1e901776ddacc5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Nick Clifton <nickc@redhat.com>
|
||||||
|
Date: Thu, 28 May 2020 11:04:27 +0100
|
||||||
|
Subject: [PATCH] Fix a potential use of an uninitialised value in the ns32k
|
||||||
|
disassembler.
|
||||||
|
|
||||||
|
* ns32k-dis.c (print_insn_ns32k): Change the arg_bufs array to
|
||||||
|
static.
|
||||||
|
---
|
||||||
|
opcodes/ns32k-dis.c | 5 ++++-
|
||||||
|
1 files changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/opcodes/ns32k-dis.c b/opcodes/ns32k-dis.c
|
||||||
|
index 12df182..ccad820 100644
|
||||||
|
--- a/opcodes/ns32k-dis.c
|
||||||
|
+++ b/opcodes/ns32k-dis.c
|
||||||
|
@@ -738,7 +738,10 @@ print_insn_ns32k (bfd_vma memaddr, disassemble_info *info)
|
||||||
|
unsigned short first_word;
|
||||||
|
int ioffset; /* Bits into instruction. */
|
||||||
|
int aoffset; /* Bits into arguments. */
|
||||||
|
- char arg_bufs[MAX_ARGS+1][ARG_LEN];
|
||||||
|
+ /* The arg_bufs array is made static in order to avoid a potential
|
||||||
|
+ use of an uninitialised value if we are asekd to disassemble a
|
||||||
|
+ corrupt instruction. */
|
||||||
|
+ static char arg_bufs[MAX_ARGS+1][ARG_LEN];
|
||||||
|
int argnum;
|
||||||
|
int maxarg;
|
||||||
|
struct private priv;
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
Summary: Binary utilities
|
Summary: Binary utilities
|
||||||
Name: binutils
|
Name: binutils
|
||||||
Version: 2.34
|
Version: 2.34
|
||||||
Release: 3
|
Release: 4
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: https://sourceware.org/binutils
|
URL: https://sourceware.org/binutils
|
||||||
|
|
||||||
@ -34,6 +34,8 @@ Patch17: Re-asan-more-readelf-leaks.patch
|
|||||||
Patch18: readelf-leak-in-process_archive.patch
|
Patch18: readelf-leak-in-process_archive.patch
|
||||||
Patch19: metag-uninitialized-memory-read.patch
|
Patch19: metag-uninitialized-memory-read.patch
|
||||||
|
|
||||||
|
Patch20: Fix-a-potential-use-of-an-uninitialised-value-in-the.patch
|
||||||
|
|
||||||
Provides: bundled(libiberty)
|
Provides: bundled(libiberty)
|
||||||
|
|
||||||
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
Buildroot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||||
@ -320,6 +322,11 @@ fi
|
|||||||
%{_infodir}/bfd*info*
|
%{_infodir}/bfd*info*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Sep 18 2020 zoulin <zoulin13@huawei.com> - 2.34-4
|
||||||
|
- Type:bugfix
|
||||||
|
- ID:NA
|
||||||
|
- SUG:Fix a potential use-of-an-uninitialised-value in the print_insn_ns32k of fuzz_disassemble
|
||||||
|
|
||||||
* Fri Sep 11 2020 zoulin <zoulin13@huawei.com> - 2.34-3
|
* Fri Sep 11 2020 zoulin <zoulin13@huawei.com> - 2.34-3
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user