)]}' { "commit": "17be3872ab3243fff6014f66d196d77b79d18119", "tree": "3f09718ace7bc551fef129c80ddf71a5ffcc4fd3", "parents": [ "897a2ca3f184b34278641138c726ef902ab1fab2" ], "author": { "name": "Dan McArdle", "email": "dmcardle@google.com", "time": "Tue Jul 20 12:55:35 2021 -0400" }, "committer": { "name": "Boringssl LUCI CQ", "email": "boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com", "time": "Tue Jul 20 18:37:20 2021 +0000" }, "message": "Check strtoul return for overflow error in GetUnsigned()\n\nCurrently, GetUnsigned() calls strtoul and checks whether the resulting\nunsigned long int is greater than UINT_MAX. This implicitly assumes that\nUINT_MAX \u003c ULONG_MAX.\n\nProblematically, `unsigned long int` and `unsigned` have the same size\non Windows [0] and on 32-bit architectures.\n\nFor correctness, we now check whether strtoul failed because it would\noverflow the unsigned long int before checking whether the value fits in\nan unsigned type.\n\n[0]: https://docs.microsoft.com/en-us/cpp/cpp/data-type-ranges?view\u003dmsvc-160\n\nChange-Id: I49702febf4543bfb7991592717443e0b2adb954f\nReviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/48545\nCommit-Queue: Dan McArdle \u003cdmcardle@google.com\u003e\nCommit-Queue: David Benjamin \u003cdavidben@google.com\u003e\nReviewed-by: David Benjamin \u003cdavidben@google.com\u003e\n", "tree_diff": [ { "type": "modify", "old_id": "9ec18a3f5bb9dd6456f5674cc5ca05f37bd45f46", "old_mode": 33188, "old_path": "tool/args.cc", "new_id": "4deb881260441a0d5676be3638fc9376c75cb2bc", "new_mode": 33188, "new_path": "tool/args.cc" } ] }