Change in libosmo-netif[master]: osmux: Check received osmuxh->amr_ft is correct before using it
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. -- To view, visit https://gerrit.osmocom.org/c/libosmo-netif/+/30224 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-netif Gerrit-Branch: master Gerrit-Change-Id: Iab525c5b7eb1e455a8229fb39e96897aac53298c Gerrit-Change-Number: 30224 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-Reviewer: msuraev <msuraev@sysmocom.de> Gerrit-Reviewer: osmith <osmith@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged
participants (1)
-
pespin