SQL: Disallow implicit integer downconversion on BindInt
Calling sql::Statement::BindInt() with an int64_t argument silently downconverted, potentially saving incorrect data to a database. sql::Statement::BindInt64(int64_t) should be used instead. Introduce an uncallable sql::Statement::BindInt(int64_t) overload to fail the compile. This also catches calling BindInt with uint32_t. Fix up various callers that were silently downconverting. Bug: 908690 Change-Id: I1472ad5461c7e60bfc011def85a48bc9ca216734 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1935607 Commit-Queue: Joshua Bell <jsbell@chromium.org> Reviewed-by:Becca Hughes <beccahughes@chromium.org> Reviewed-by:
Cathy Li <chili@chromium.org> Reviewed-by:
Jan Wilken Dörrie <jdoerrie@chromium.org> Reviewed-by:
Scott Violet <sky@chromium.org> Reviewed-by:
Victor Costan <pwnall@chromium.org> Cr-Commit-Position: refs/heads/master@{#723469}
Showing
Please register or sign in to comment