1 From 112d1645bab7922c7796fe32ddea8fa6e1bbded1 Mon Sep 17 00:00:00 2001
2 From: Hongxu Jia <hongxu.jia@windriver.com>
3 Date: Fri, 29 Jun 2018 15:14:28 +0800
4 Subject: [PATCH] Fix control path where we have str as uninitialized string
7 /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:
8 In function 'i386_disasm':
10 /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:310:5:
11 error: 'str' may be used uninitialized in this function
12 [-Werror=maybe-uninitialized]
13 | memcpy (buf + bufcnt, _str, _len); \
16 /home/ubuntu/work/oe/openembedded-core/build/tmp-musl/work/i586-oe-linux-musl/elfutils/0.164-r0/elfutils-0.164/libcpu/i386_disasm.c:709:17:
17 note: 'str' was declared here
20 Signed-off-by: Khem Raj <raj.khem@gmail.com>
21 Upstream-Status: Pending
25 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
28 libcpu/i386_disasm.c | 1 +
29 1 file changed, 1 insertion(+)
31 diff --git a/libcpu/i386_disasm.c b/libcpu/i386_disasm.c
32 index a7e03f9..837a3a8 100644
33 --- a/libcpu/i386_disasm.c
34 +++ b/libcpu/i386_disasm.c
35 @@ -821,6 +821,7 @@ i386_disasm (Ebl *ebl __attribute__((unused)),
40 assert (! "INVALID not handled");