This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

[Bug report]OPUS, array out of range

[Version]: nRFready Smart Remote 3 nRF52 v1.2.1alpha

[Project]: nRFready Smart Remote 3 nRF52 v1.2.1alpha\nRF5x SDK-SR3\examples\ble_peripheral\smart_remote_3_nrf52

[File]:smart_remote_3_nrf52\Source\Libraries\opus-1.2.1\define.h

Here is a define:

42 /* Number of decoder channels (1/2) */
43 #define DECODER_NUM_CHANNELS 1

as we see, the macro's value is 1

but in file: dec_API.c

it try to get &channel_state[ 1 ], channel_state points to psDec->channel_state, psDec is struct silk_decoder, 

so we found channel_state is a array with 1 size, &channel_state[1] will cause out of range!!!

I check original macro from opus-1.2.1, the DECODER_NUM_CHANNELS is 2, 

Hope to fix

Thanks.

Parents
  • Hi Lin, 

    Thank you for letting us know.

    I agree that this looks like a bug. 

    The Smart Remote 3 firmware only uses the OPUS library for encoding since the the audio is only going from the remote to the Ubuntu host. The OPUS library is optimized for size in the SR3 firmware, so unless you're adding support for audio in both directions, then the SILK encoder is most likely optimized out. Are you adding support for encoding in a remote product?

    Best regards

    Bjørn

Reply
  • Hi Lin, 

    Thank you for letting us know.

    I agree that this looks like a bug. 

    The Smart Remote 3 firmware only uses the OPUS library for encoding since the the audio is only going from the remote to the Ubuntu host. The OPUS library is optimized for size in the SR3 firmware, so unless you're adding support for audio in both directions, then the SILK encoder is most likely optimized out. Are you adding support for encoding in a remote product?

    Best regards

    Bjørn

Children
Related