Skip to content
Success

Changes

Summary

  1. trau2rtp FR & EFR: fix uninitialized memory bug (details)
Commit f390e8e41d9061e1f7e2d21eea5947ca102440f5 by falcon
trau2rtp FR & EFR: fix uninitialized memory bug

The implementation of osmo_trau2rtp() for FR and EFR speech frames
had this bug: when moving individual bits from TRAU to RTP payload
representation, the code would only set bits in the output buffer,
but never clear them.  The result is correct output only when the
RTP payload buffer has been zeroed prior to calling the function,
garbage otherwise.

OsmoMGW was not affected by this bug because it calls osmo_trau2rtp()
with the output buffer pointed to a freshly allocated msgb, and
msgb allocation in libosmocore memsets buffer memory to zeros.
However, a sane API should not depend on previous content of output
buffer memory, hence the function implementation in libosmotrau
was still in the wrong.

Change-Id: I6e6693e096b920a973c8cc627e94884099d004b5
The file was modifiedsrc/trau/trau_rtp_conv.c