Browse Source

golay2312 : Initialize correction tables

Initialize the Golay correction tables so the decoder starts with defined
table contents before they are populated and used. This avoids undefined
behavior from accessing uninitialized member storage.

Found by cppcheck (uninitMemberVar).

Signed-off-by: Robin Getz <rgetz503@gmail.com>
chirpmodem-v8.0.0
Robin Getz 2 months ago
parent
commit
6667c7f1b0
No known key found for this signature in database
GPG Key ID: 51C7231FFED0E060
  1. 4
      sdrbase/util/golay2312.cpp

4
sdrbase/util/golay2312.cpp

@ -63,7 +63,9 @@ const unsigned int Golay2312::m_I12[12] = { @@ -63,7 +63,9 @@ const unsigned int Golay2312::m_I12[12] = {
0b000000000001,
};
Golay2312::Golay2312()
Golay2312::Golay2312() :
m_corrPL{},
m_corrPF{}
{
initG();
initH();

Loading…
Cancel
Save