pespin has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-netif/+/30224 )
Change subject: osmux: Check received osmuxh->amr_ft is correct before using it ......................................................................
osmux: Check received osmuxh->amr_ft is correct before using it
Fixes: Coverity CID#283432 Change-Id: Iab525c5b7eb1e455a8229fb39e96897aac53298c --- M src/osmux_output.c 1 file changed, 5 insertions(+), 0 deletions(-)
Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved fixeria: Looks good to me, but someone else must approve osmith: Looks good to me, but someone else must approve msuraev: Looks good to me, but someone else must approve
diff --git a/src/osmux_output.c b/src/osmux_output.c index a6e6513..6b9f451 100644 --- a/src/osmux_output.c +++ b/src/osmux_output.c @@ -68,6 +68,11 @@ case OSMUX_FT_VOICE_AMR: break; case OSMUX_FT_DUMMY: + if (!osmo_amr_ft_valid(osmuxh->amr_ft)) { + LOGP(DLMUX, LOGL_ERROR, "Discarding bad Dummy FT: amr_ft=%u\n", + osmuxh->amr_ft); + return NULL; + } len = osmux_ft_dummy_size(osmuxh->amr_ft, osmuxh->ctr + 1); if (msgb_length(msg) < len) { LOGP(DLMUX, LOGL_ERROR, "Discarding bad Dummy FT: %s\n",
3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.