[ubsan][bigint] Fix int overflow in BigIntToStringImpl
The result of Object::ToInteger is a number rounded to an integer value, but not necessarily in the range of what a C++ "int" can represent. Doing the 2 <= radix <= 36 range check first makes the subsequent cast safe. Bug: chromium:927212 Change-Id: I49f115140f6dc1f951cbc08a3025b3ac92ec8628 Reviewed-on: https://chromium-review.googlesource.com/c/1449040 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#59303}
Showing
Please
register
or
sign in
to comment