summaryrefslogtreecommitdiffstats
path: root/hw/ppc
diff options
context:
space:
mode:
authorAlexey Kardashevskiy2022-04-06 06:50:13 +0200
committerDaniel Henrique Barboza2022-04-20 23:00:30 +0200
commit23bd5fc3ed1a681eb4f1e1308bb2869fb7ca050f (patch)
treee8a5beb5cf1629a59e58be029cedc183009bc6ac /hw/ppc
parenthw/ppc/ppc405_boards: Initialize g_autofree pointer (diff)
downloadqemu-23bd5fc3ed1a681eb4f1e1308bb2869fb7ca050f.tar.gz
qemu-23bd5fc3ed1a681eb4f1e1308bb2869fb7ca050f.tar.xz
qemu-23bd5fc3ed1a681eb4f1e1308bb2869fb7ca050f.zip
ppc/vof: Fix uninitialized string tracing
There are error paths which do not initialize propname but the trace_exit label prints it anyway. This initializes the problem string. Spotted by Coverity CID 1487241. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com> Message-Id: <20220406045013.3610172-1-aik@ozlabs.ru> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/vof.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/ppc/vof.c b/hw/ppc/vof.c
index 8d96593677..18c3f92317 100644
--- a/hw/ppc/vof.c
+++ b/hw/ppc/vof.c
@@ -293,7 +293,7 @@ static uint32_t vof_setprop(MachineState *ms, void *fdt, Vof *vof,
uint32_t nodeph, uint32_t pname,
uint32_t valaddr, uint32_t vallen)
{
- char propname[OF_PROPNAME_LEN_MAX + 1];
+ char propname[OF_PROPNAME_LEN_MAX + 1] = "";
uint32_t ret = PROM_ERROR;
int offset, rc;
char trval[64] = "";