summaryrefslogtreecommitdiff
path: root/libs/androidfw/misc.cpp
diff options
context:
space:
mode:
author Pavan Kumar M <quic_rpavan@quicinc.com> 2021-05-24 00:28:41 +0530
committer Pavan Kumar M <quic_rpavan@quicinc.com> 2021-05-26 08:09:31 +0000
commit9c48c78de3ebecafd9c8cef832ebe5079c639e42 (patch)
treef5d60c1e018f67f0e6c3ffba872888da936687ed /libs/androidfw/misc.cpp
parent8c702c2d6ae485f71110b9593b25af5367fda220 (diff)
Gracefully handle integer overflows.
Avoid recording negative data by doing integer-based math as much as possible, but switch to double-based math if we detect that we'd end up causing an overflow. Test : - Builds, Boots - High data throughput scenarios - NetworkStatsHistoryTest, NetworkStatsCollectionTest, NetworkStatsTest Bug: 119527458 Change-Id: I355fc9bd127da83c1dc70ab3b1261346d4fa5de0
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions