Skip to content

Initialize DMR basic privacy key to zero#48

Merged
f4exb merged 1 commit intof4exb:masterfrom
argilo:initialize-dmr-bp-key
Jun 21, 2022
Merged

Initialize DMR basic privacy key to zero#48
f4exb merged 1 commit intof4exb:masterfrom
argilo:initialize-dmr-bp-key

Conversation

@argilo
Copy link
Copy Markdown
Contributor

@argilo argilo commented May 2, 2022

DMR audio output is sometimes garbled. This occurs because the dmr_bp_key variable is not initialized, and may therefore contain a random value. Valgrind detects the bug:

==1057659== Conditional jump or move depends on uninitialised value(s)
==1057659==    at 0x486F0DD: DSDcc::DSDDMR::BasicPrivacyXOR(unsigned char*, int) (in /home/argilo/prefix_311/lib/libdsdcc.so.1.9.0)
==1057659==    by 0x48700FD: DSDcc::DSDDMR::processVoiceDibit(unsigned char) (in /home/argilo/prefix_311/lib/libdsdcc.so.1.9.0)
==1057659==    by 0x48708CE: DSDcc::DSDDMR::processVoiceFirstHalf(unsigned int) (in /home/argilo/prefix_311/lib/libdsdcc.so.1.9.0)
==1057659==    by 0x48719A5: DSDcc::DSDDecoder::processFrameInit() (in /home/argilo/prefix_311/lib/libdsdcc.so.1.9.0)
==1057659==    by 0x10AD00: main (in /home/argilo/prefix_311/bin/dsdccx)

Initializing this field to zero fixes the problem.

@f4exb f4exb merged commit 4e954c2 into f4exb:master Jun 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants