Change in libosmocore[master]: WIP: Attempt to avoid bogus gcc-8.2 array-bounds warning/error

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/gerrit-log@lists.osmocom.org/.

Vadim Yanitskiy gerrit-no-reply at lists.osmocom.org
Sun Jan 20 10:38:54 UTC 2019


Vadim Yanitskiy has posted comments on this change. ( https://gerrit.osmocom.org/12641 )

Change subject: WIP: Attempt to avoid bogus gcc-8.2 array-bounds warning/error
......................................................................


Patch Set 2:

(2 comments)

https://gerrit.osmocom.org/#/c/12641/2//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/12641/2//COMMIT_MSG@23
PS2, Line 23: the return value of gsm48_generate_mid_from_imsi()
            : could be 130
Oh, wow...


https://gerrit.osmocom.org/#/c/12641/2/src/gsm/gsm48.c
File src/gsm/gsm48.c:

https://gerrit.osmocom.org/#/c/12641/2/src/gsm/gsm48.c@668
PS2, Line 668: 2 + buf[1]
Hmm, why do we add 2 here?

We use buf[0], buf[1], and buf[2], and then buf[2 + i], where i starts from 1...

I think one byte is lost, and we should return 3 + buf[1].



-- 
To view, visit https://gerrit.osmocom.org/12641
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Ic8488bc7f77dc9182e372741b88f0f06100dddc9
Gerrit-Change-Number: 12641
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-CC: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Comment-Date: Sun, 20 Jan 2019 10:38:54 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190120/8d561bb5/attachment.htm>


More information about the gerrit-log mailing list