Doing so could be considered UB in a pedantic interpretation of the standard. Avoid it.
Closes #876.
Doing so could be considered UB in a strict reading of the standard.
Avoid it.
When we change the contrib functions, we should also consider changing the copies in Bitcoin Core, see #781 edit: What I’m saying is: Let’s take care of this in #781.
Can you also change the comparison in the same function here https://github.com/bitcoin-core/secp256k1/blob/9570f674cc729cafcba65f4cce03552d9a6108f4/src/ecdsa_impl.h#L115
to read rlen > (size_t)(sigend - *sig)
? This will never compute an out-of-bounds pointer (which is another case of pedantic UB).
ACK 9570f674cc729cafcba65f4cce03552d9a6108f4
I’ll open a new PR for the other issue