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/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Mon Jun 12 19:37:46 UTC 2017


Max,

you fixed the coverity issue in https://gerrit.osmocom.org/2885, but a few
lines above that, there is another +1 that seems one +1 too many:

                if (m_id_len > MAX_BTS_FEATURES/8 + 1) {
                        LOGP(DNM, LOGL_NOTICE, "BTS%u Get Attributes Response: feature vector is truncated to %u bytes\n",
                             bts->nr, MAX_BTS_FEATURES/8);
                        m_id_len = MAX_BTS_FEATURES/8;
                }

I can't claim I understand why this size check is necessary on top of the other one,
but certainly "> MAX_BTS_FEATURES/8 + 1" doesn't match setting
"m_id_len = MAX_BTS_FEATURES/8".

~N

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20170612/43e55735/attachment.bin>


More information about the OpenBSC mailing list