android_util_Process: fix length checking logic
The length should be checked first before access it Test: m Change-Id: I540301c9a30c2fe441562d7a047c06011efd8fbe
This commit is contained in:
@@ -991,7 +991,7 @@ jboolean android_os_Process_parseProcLineArray(JNIEnv* env, jobject clazz,
|
||||
end = i;
|
||||
i++;
|
||||
} else if ((mode&PROC_QUOTES) != 0) {
|
||||
while (buffer[i] != '"' && i < endIndex) {
|
||||
while (i < endIndex && buffer[i] != '"') {
|
||||
i++;
|
||||
}
|
||||
end = i;
|
||||
|
||||
Reference in New Issue
Block a user