Merge "Fix out of bound error of IncidentService" into rvc-qpr-dev am: f1d26a395f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12560657 Change-Id: I235a1d3fb89567116484bc9383830d390862fb1a
This commit is contained in:
@@ -554,6 +554,10 @@ status_t IncidentService::command(FILE* in, FILE* out, FILE* err, Vector<String8
|
|||||||
return NO_ERROR;
|
return NO_ERROR;
|
||||||
}
|
}
|
||||||
if (!args[0].compare(String8("section"))) {
|
if (!args[0].compare(String8("section"))) {
|
||||||
|
if (argCount == 1) {
|
||||||
|
fprintf(out, "Not enough arguments for section\n");
|
||||||
|
return NO_ERROR;
|
||||||
|
}
|
||||||
int id = atoi(args[1]);
|
int id = atoi(args[1]);
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
while (SECTION_LIST[idx] != NULL) {
|
while (SECTION_LIST[idx] != NULL) {
|
||||||
|
|||||||
Reference in New Issue
Block a user