Attention is currently required from: neels, laforge. pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/30111 ) Change subject: fix sdp_msg_to_sdp_str(), never add fmtp for unset codec ...................................................................... Patch Set 1: (1 comment) File src/libmsc/sdp_msg.c: https://gerrit.osmocom.org/c/osmo-msc/+/30111/comment/b067e8c2_cd38a3ea PS1, Line 271: if (!sdp_audio_codec_is_set(codec))
the previous code did not check if codec->subtype was a valid pointer at all, and unconditionally de […] """ #define foreach_sdp_audio_codec(/* struct sdp_audio_codec* */ CODEC, \ /* struct sdp_audio_codecs* */ AC) \ for (CODEC = (AC)->codec; \ (CODEC - (AC)->codec) < OSMO_MIN((AC)->count, ARRAY_SIZE((AC)->codec)); \ CODEC++)
""" """ bool sdp_audio_codec_is_set(const struct sdp_audio_codec *a) { return a && a->subtype_name[0]; } """ Can "codec" be really NULL here? I don't think so (maybe if &sdp->audio_codecs->codec==NULL, but is that really possible?) -- To view, visit https://gerrit.osmocom.org/c/osmo-msc/+/30111 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-msc Gerrit-Branch: master Gerrit-Change-Id: I1892efd9360585f98419ebbd0df180f7f3a8160d Gerrit-Change-Number: 30111 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: laforge <laforge@osmocom.org> Gerrit-CC: pespin <pespin@sysmocom.de> Gerrit-Attention: neels <nhofmeyr@sysmocom.de> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Comment-Date: Tue, 15 Nov 2022 11:35:03 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: laforge <laforge@osmocom.org> Comment-In-Reply-To: pespin <pespin@sysmocom.de> Gerrit-MessageType: comment