Hi Ole,

OK, now I have changed the patch to include a bounds check. This is
still using an intermediate u32 variable however, I tried making
collector_port a u32 but then one of the Gerrit tests failed, I wasn't
able to figure out why as I could not reproduce that problem on my end,
it happened only in one of the gerrit test cases. This way, with a
temporary u32 variable that is copied to the u16 collector_port after
the bounds check, both solves the crash for me and passes the Gerrit
tests:

https://gerrit.fd.io/r/c/vpp/+/27280

What do you think, is this an acceptable solution?
(Otherwise it would be necessary to dig deeper into what went wrong in
the gerrit tests when collector_port was declared as u32.)

Best regards,
Elias


On Wed, 2020-05-27 at 09:15 +0200, Ole Troan wrote:
> Hi Elias,
> 
> Thanks for spotting that.
> Just make collector_port a u32 and add a boundary check?
> 
> Best regards,
> Ole
> 
> [...]
> > 
> > Here is a fix, please check it and merge if you agree:
> > https://gerrit.fd.io/r/c/vpp/+/27280
> > 
> > Best regards,
> > Elias
> > 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#16532): https://lists.fd.io/g/vpp-dev/message/16532
Mute This Topic: https://lists.fd.io/mt/74491544/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to