Change in ...libosmocore[master]: bitvec: bitvec_get_uint() should return an unsigned int

laforge gerrit-no-reply at lists.osmocom.org
Tue Jul 16 04:05:26 UTC 2019


laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14577 )

Change subject: bitvec: bitvec_get_uint() should return an unsigned int
......................................................................


Patch Set 2: Code-Review-1

as the (likey?) orignal author of the code, I would say the function does exactly what it is supposed to do: parse input as unsigned integer and return it, just as long as it is below the maximum of a signed integer.  return negative in case of error.

If there is anything to change, then it could be bounds checking, i.e. ASSERT that the caller doesn't pass num_bits leading to potential overflows of INT_MAX.


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

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I2d50d375ccf63ecb45061682ede0b46b6087d11a
Gerrit-Change-Number: 14577
Gerrit-PatchSet: 2
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu>
Gerrit-Comment-Date: Tue, 16 Jul 2019 04:05:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190716/2fe2df4d/attachment.html>


More information about the gerrit-log mailing list