]> Git Repo - secp256k1.git/commit
Fix possible integer overflow in DER parsing
authorTim Ruffing <[email protected]>
Thu, 1 Nov 2018 11:15:28 +0000 (12:15 +0100)
committerTim Ruffing <[email protected]>
Fri, 14 Dec 2018 10:43:47 +0000 (11:43 +0100)
commit3cb057f8429c812b5dbfcd43299658463162b740
tree11ecdb35be1b87c3e15007e2a531f83fabf73803
parent1e6f1f5ad5e7f1e3ef79313ec02023902bf8175c
Fix possible integer overflow in DER parsing

If we’re in the last loop iteration, then `lenleft == 1` and it could
be the case that `ret == MAX_SIZE`, and so `ret +  lenleft` will
overflow to 0 and the sanity check will not catch it. Then we will
return `(int) MAX_SIZE`, which should be avoided because this value is
implementation-defined. (However, this is harmless because
`(int) MAX_SIZE == -1` on all supported platforms.)
src/ecdsa_impl.h
This page took 0.024673 seconds and 4 git commands to generate.