Skip to content

Fix out-of-bound array accesses in PUCCH2 decoder

Thomas Laurent requested to merge fix-rx_pucch2 into develop

there are index errors in the function, i tried to fix it and to make a bit better code style
at least --sanitize detects out of array access and i agree with gcc

i changed a couple of things that are for me bugs (idx should be 0..3 not 0..7 and prb==2 should likely be prb++)
the memset() in case of odd number of PRBs seems also clearly wrong (sets the wrong part of the array)

for me, the author makes everything more complex than it should be by creating a lot of intermediate variables with separation of real and imaginary

IMHO all the printf() doesn't help and are not useful, gdb is better, but it have kept them

Edited by Robert Schmidt

Merge request reports