Attention is currently required from: fixeria, laforge. neels has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/37994?usp=email )
Change subject: coverity CID#272968 CID#272939 ...................................................................... Patch Set 1: (1 comment) File src/sccp.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/37994/comment/68305ea2_b292d906?usp=email : PS1, Line 167: return 0; > hmm all callers do […] Ah, here is a hint. The loop apparently parses *a series* of optional data, so if the first succeeded, what to return if the second fails / if there are some surplus bytes / the list is not properly terminated. Do we want to rather continue to evaluate what we have, or fail the entire packet. Also if there can ever be multiple optional data, this function only returns the valid *last* entry. Also all callers explicitly memset(0) the return data, because if there is no optional data, this function just returns 0 without setting the return value. There seems to be a whole bunch of things we should fix about this function. Should it support multiple Optional Data, or just error on multiple entries? I haven't yet seen an SCCP packet with more than one optional data... thoughts? -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/37994?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ic6823cf077ef15ef1f6e209bf53384913911f93e Gerrit-Change-Number: 37994 Gerrit-PatchSet: 1 Gerrit-Owner: neels <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <[email protected]> Gerrit-CC: laforge <[email protected]> Gerrit-Attention: laforge <[email protected]> Gerrit-Attention: fixeria <[email protected]> Gerrit-Comment-Date: Wed, 04 Sep 2024 01:41:33 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: neels <[email protected]> Comment-In-Reply-To: laforge <[email protected]> Comment-In-Reply-To: fixeria <[email protected]>
