dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/20979 )
Change subject: measurement.c: fix integer overflow problem ...................................................................... Patch Set 2: (2 comments) I checked your expression with a bit of math, don't know if it is correct, but it should be. num_meas_sub_expect is on both sides of the equation, so it should be possible to eliminate it. https://gerrit.osmocom.org/c/osmo-bts/+/20979/1/src/common/measurement.c File src/common/measurement.c: https://gerrit.osmocom.org/c/osmo-bts/+/20979/1/src/common/measurement.c@645 PS1, Line 645: if (num_meas_sub < num_meas_sub_expect > if (num_meas_sub <= i) Done https://gerrit.osmocom.org/c/osmo-bts/+/20979/2/src/common/measurement.c File src/common/measurement.c: https://gerrit.osmocom.org/c/osmo-bts/+/20979/2/src/common/measurement.c@645 PS2, Line 645: if (num_meas_sub <= i) { > I actually meant to change the second condition of the if iirc, so it shoudl > actually be: […] I have checked it this way: num_ul_meas_expect - i <= num_meas_sub_expect - num_meas_sub num_ul_meas_expect - i <= num_meas_sub_expect - num_meas_sub | - num_meas_sub_expect - i <= - num_meas_sub | + i + num_meas_sub num_meas_sub <= i That isn't correct? -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/20979 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I381cc637d1c125f279ccf88db114609946fe24fe Gerrit-Change-Number: 20979 Gerrit-PatchSet: 2 Gerrit-Owner: dexter <pma...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de> Gerrit-CC: pespin <pes...@sysmocom.de> Gerrit-Comment-Date: Mon, 02 Nov 2020 16:03:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <pes...@sysmocom.de> Gerrit-MessageType: comment