Defensively cap number_of_leading_zeros in getNationalSignificantNumber#4010
Defensively cap number_of_leading_zeros in getNationalSignificantNumber#4010ghaithabdulreda wants to merge 4 commits into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
|
@google-cla check |
fd72c05 to
4cd9c37
Compare
|
Hi, just a friendly reminder. Could anyone from the team take a look at this fix when you have a moment? |
|
@rohininidhi @kkeshava Gentle ping on this fix. Could either of you take a look? It's been two weeks. |
|
Hi @ghaithabdulreda |
Increase the maximum number of leading zeros from 3 to 10 to handle more cases.
Increase leading zeros cap to 10
|
@mandlil Thanks for the review! I’ve updated the cap from 3 to 10 in both the Java and C++ implementations, as suggested. |
Cap the number_of_leading_zeros field at 3 in getNationalSignificantNumber()
for both Java and C++ to prevent Out-of-Memory DoS via malicious protobuf
input. The field has no upper bound in the protobuf definition and is used
directly for array allocation.
Bug: https://issuetracker.google.com/issues/523402884