New Defects reported by Coverity Scan for Osmocom

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

nhofmeyr at sysmocom.de nhofmeyr at sysmocom.de
Wed Aug 26 12:23:03 UTC 2020


On Tue, Aug 25, 2020 at 02:49:39AM +0000, scan-admin at coverity.com wrote:
> *** CID 212862:  Error handling issues  (CHECKED_RETURN)
> /source-Osmocom/osmo-pcu/src/pdch.cpp: 211 in gprs_rlcmac_pdch::packet_paging_request()()
> 205     
> 206     	/* loop until message is full */
> 207     	while (pag) {
> 208     		if (log_check_level(DRLCMAC, LOGL_DEBUG)) {
> 209     			struct osmo_mobile_identity omi = {};
> 210     			char str[64];
> >>>     CID 212862:  Error handling issues  (CHECKED_RETURN)
> >>>     Calling "osmo_mobile_identity_decode" without checking return value (as is done elsewhere 20 out of 22 times).
> 211     			osmo_mobile_identity_decode(&omi, pag->identity_lv + 1, pag->identity_lv[0], true);
> 212     			osmo_mobile_identity_to_str_buf(str, sizeof(str), &omi);
> 213     			LOGP(DRLCMAC, LOGL_DEBUG, "Paging MI - %s\n", str);
> 214     		}

I'd like to let you guys know that I intentionally don't check the return value
here. This is only for logging the mobile identity, and if decoding fails, the
logging should just show "NONE".

~N



More information about the OpenBSC mailing list