]> the.earth.li Git - onak.git/commitdiff
Prevent sign extension when parsing large packet sizes
authorJonathan McDowell <noodles@earth.li>
Mon, 22 Aug 2016 16:30:14 +0000 (17:30 +0100)
committerJonathan McDowell <noodles@earth.li>
Mon, 22 Aug 2016 16:30:14 +0000 (17:30 +0100)
A 2GB+ packet is likely to be a mistake, but in the event it was
legitimate sign extension could result in a much larger amount of
memory being allocated (and probably failing). Fix this by trying
to ensure we're doing an unsigned left shift.


No differences found