Fix issue found by UBSan under consumeCharacterReference() in CharacterReferenceParserInlines.h.
Created attachment 424201 [details]
Comment on attachment 424201 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=424201&action=review
> + Use Checked<> for the result in consumeCharacterReference() to deal with overflows
> + in a well-defined manner.
The reason UBSan doesn’t like this is that we don’t stop doing the worthless calculations once we have overflowed. Otherwise the code was fine.
> + result += static_cast<UChar32>(toASCIIHexValue(character));
Surprised that we need a typecast here; would have tried to avoid it.
Committed r275048: <https://commits.webkit.org/r275048>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 424201 [details].