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

Commit 6990465b authored by Glenn Kasten's avatar Glenn Kasten Committed by Automerger Merge Worker
Browse files

Merge "fix audioflinger integer multiplication overflow" into rvc-dev am:...

Merge "fix audioflinger integer multiplication overflow" into rvc-dev am: ec660f18 am: 652852ff am: cad958c9

Change-Id: If4676e07272d30c6e44367b98e7bc2f9b2de5370
parents c57c7973 cad958c9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -309,7 +309,7 @@ bool FastThread::threadLoop()
                    // compute the delta value of clock_gettime(CLOCK_MONOTONIC)
                    uint32_t monotonicNs = nsec;
                    if (sec > 0 && sec < 4) {
                        monotonicNs += sec * 1000000000;
                        monotonicNs += sec * 1000000000U; // unsigned to prevent signed overflow.
                    }
                    // compute raw CPU load = delta value of clock_gettime(CLOCK_THREAD_CPUTIME_ID)
                    uint32_t loadNs = 0;
@@ -325,7 +325,7 @@ bool FastThread::threadLoop()
                            }
                            loadNs = nsec;
                            if (sec > 0 && sec < 4) {
                                loadNs += sec * 1000000000;
                                loadNs += sec * 1000000000U; // unsigned to prevent signed overflow.
                            }
                        } else {
                            // first time through the loop