From: Gregory Maxwell Date: Wed, 29 May 2019 10:35:10 +0000 (+0000) Subject: Merge #578: Avoid implementation-defined and undefined behavior when dealing with... X-Git-Url: https://repo.jachan.dev/secp256k1.git/commitdiff_plain/544435fc90a5672d862e2a51f44c10251893b97d Merge #578: Avoid implementation-defined and undefined behavior when dealing with sizes 14c7dbd Simplify control flow in DER parsing (Tim Ruffing) ec8f20b Avoid out-of-bound pointers and integer overflows in size comparisons (Tim Ruffing) 01ee1b3 Parse DER-enconded length into a size_t instead of an int (Tim Ruffing) 3cb057f Fix possible integer overflow in DER parsing (Tim Ruffing) Pull request description: This is a result of auditing the code for overflow issues at random places. None of this is critical but I think all of it should be fixed. I know this touches "red" code. I double-checked and triple-checked this but I can understand if some of the changes are not desirable because they change well-tested code. Best reviewed in individual commits. ACKs for commit 14c7db: Tree-SHA512: 312dd3f961739752e1a861e75bd755920f634f87ee9668793e102c224434e8d21367452e114de729322c71a89f4fa82126aa5d32742f2bbbc091777c99515e10 --- 544435fc90a5672d862e2a51f44c10251893b97d