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

Commit 679d5e64 authored by Vishwath Mohan's avatar Vishwath Mohan Committed by Chad Brubaker
Browse files

Fix benign unsigned integer overflow

Fixes a benign overflow error in ANetworkSession.cpp

Bug: 23110888
Change-Id: Ic64f5100ab1e3f2ffe247ca4f7b40d38c1ff0c2a
(cherry picked from cfe30231)
parent aa606b14
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1318,7 +1318,8 @@ void ANetworkSession::threadLoop() {

        List<sp<Session> > sessionsToAdd;

        for (size_t i = mSessions.size(); res > 0 && i-- > 0;) {
        for (size_t i = mSessions.size(); res > 0 && i > 0;) {
            i--;
            const sp<Session> &session = mSessions.valueAt(i);

            int s = session->socket();
@@ -1409,4 +1410,3 @@ void ANetworkSession::threadLoop() {
}

}  // namespace android