Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cdbd77a8 authored by Gabriel Biren's avatar Gabriel Biren Committed by Android (Google) Code Review
Browse files

Merge "Fix mul-overflow when converting scan result's age from ms to us" into main

parents 743bd1eb 5a441fcf
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -3883,7 +3883,8 @@ bool convertCachedScanResultToAidl(const legacy_hal::wifi_cached_scan_result& le
        return false;
    }
    *aidl_scan_result = {};
    aidl_scan_result->timeStampInUs = ts_us - legacy_scan_result.age_ms * 1000;
    aidl_scan_result->timeStampInUs =
            ts_us - (static_cast<uint64_t>(legacy_scan_result.age_ms) * 1000);
    if (aidl_scan_result->timeStampInUs < 0) {
        aidl_scan_result->timeStampInUs = 0;
        return false;