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

Commit e5795610 authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Fix a crash in BatteryStatsImpl, due to a previous fix.

This is probably the real fix for the original bug. The last line was probably not
well formed and resulted in an overrun in the native code.

Bug: 2564824
Change-Id: I8a9cc267f8045a61eff4b5d532258afa32a8b837
parent 73a8f26a
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -891,7 +891,10 @@ public final class BatteryStatsImpl extends BatteryStats {
                for (endIndex=startIndex; 
                        endIndex < len && wlBuffer[endIndex] != '\n' && wlBuffer[endIndex] != '\0'; 
                        endIndex++);
                // Don't go over the end of the buffer
                if (endIndex < len) {
                    endIndex++; // endIndex is an exclusive upper bound.
                }

                String[] nameStringArray = mProcWakelocksName;
                long[] wlData = mProcWakelocksData;