jgarzik / univalue

High performance RAII C++ JSON library and universal value object class
MIT License
56 stars 77 forks source link

Use size_t for UniValue array indexing #35

Closed str4d closed 7 years ago

str4d commented 7 years ago

Resolves potentially security-relevant integer overflow bugs:

Also fixes some MacOS compile issues when trying to create values from size_t.

str4d commented 7 years ago

See https://github.com/zcash/zcash/pull/1990#discussion_r99039934 etc. for context.

jgarzik commented 7 years ago

Manual partial merge via 640158fa26bcba551855782bf5bd73900a7e7c61 and 0d3e74dd1e8c8898a4db5cafd1fe4b833bfb5f16