capnproto / capnproto-java

Cap'n Proto in pure Java
Other
391 stars 86 forks source link

#122 Add bound checks for struct size (+ fix bounds check implementation) #125

Closed mdindoffer closed 2 years ago

mdindoffer commented 2 years ago

This PR Fixes #122 by adding bounds check to struct parsing code..

Also, previous bounds check implementation used wrong comparison sign for comparing the declared size with the capacity of a buffer, so this is now fixed as well.