jgarzik / univalue

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

UniValue::read(): Clear internal state upon error #58

Closed jgarzik closed 5 years ago

jgarzik commented 5 years ago

Avoid parsing edge cases that leave the class internal data in an inconsistent state, when the parser encounters an input data error.

This is a rewrite of PR #39 by @awemany.