Prevent int underflow when parsing exponents
When parsing negative exponents, the current implementation takes precautions for |exp| to not underflow int. But that is not sufficient: later on [1], |exp + expFrac| is also stored to an int - so we must ensure that the sum stays within int representable values. Update the exp clamping logic to take expFrac into account. [1] https://github.com/Tencent/rapidjson/blob/master/include/rapidjson/reader.h#L1690
Showing
Please
register
or
sign in
to comment