]> the.earth.li Git - onak.git/commit
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)
commita75148cf51de7fe9112f5ba260e62828d5297979
tree9decbbaf2ceee4e359f6c267f145a645e6842b98
parentde396fa4c9a6049fb6d8a31993f5e8ca762ace74
Prevent sign extension when parsing large packet sizes

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.
parsekey.c