aboutsummaryrefslogtreecommitdiff
path: root/decoder
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2021-03-31 21:40:29 -0700
committerMike Leach <mike.leach@linaro.org>2021-05-17 15:35:20 +0100
commit3b1d2313ba38801a17b74ddc24549bfd58e17011 (patch)
treecd308da735bb6bc6b0098a9291be66378d3b9550 /decoder
parentfef1cd676aaff1b21b39184415cb87a5663d650e (diff)
downloadOpenCSD-3b1d2313ba38801a17b74ddc24549bfd58e17011.tar.gz
opencsd: Avoid read of uninitialized value
OcsdGenElemStack::isInit may read m_sendIf but the constructor hasn't explicitly initialized it. This can lead to reads of an uninitialized variable. Fix by adding initialization to the constructor. This issue was caught by LLVM's memory sanitizer.
Diffstat (limited to 'decoder')
-rw-r--r--decoder/source/ocsd_gen_elem_stack.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/decoder/source/ocsd_gen_elem_stack.cpp b/decoder/source/ocsd_gen_elem_stack.cpp
index bb75842..66fe75d 100644
--- a/decoder/source/ocsd_gen_elem_stack.cpp
+++ b/decoder/source/ocsd_gen_elem_stack.cpp
@@ -42,6 +42,7 @@ OcsdGenElemStack::OcsdGenElemStack() :
m_curr_elem_idx(0),
m_send_elem_idx(0),
m_CSID(0),
+ m_sendIf(NULL),
m_is_init(false)
{