M17: Synchronizer: fixed uninitialized variable and out-of-bounds array access.

This commit is contained in:
Morgan Diepart 2024-11-05 19:04:13 +01:00 committed by Silvano Seva
parent e1572f8eb5
commit dd8d6be5a9
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ public:
* @param sync_word: symbols of the target syncword. * @param sync_word: symbols of the target syncword.
*/ */
Synchronizer(std::array< int8_t, SYNCW_SIZE >&& sync_word) : Synchronizer(std::array< int8_t, SYNCW_SIZE >&& sync_word) :
syncword(std::move(sync_word)) { } syncword(std::move(sync_word)), triggered(false) { }
/** /**
* Destructor. * Destructor.
@ -96,7 +96,7 @@ public:
index += 1; index += 1;
} }
if(values[index] >= 0) if(peak >= 0)
sign = 1; sign = 1;
else else
sign = -1; sign = -1;