ASessionDescription:Invalid index in Parse()
Usage of find("=") at line 143 is redundant as equalPos would be 1 always because of the
conditional check at lines,
79 if (line.size() < 2 || line.c_str()[1] != '=') {
80 return false;
}
However, keeping the find("=") code as it is because in case if someone changes line 79/80 later,
still the code at 143 should be robust. Hence added a conditional check
to make return false when equalPos < 0.
Bug: 111681250
Test: Clean up code.
Change-Id: I8bd90da39e2df8ede8bab5712911bcf0fbe28a8a
Loading
Please register or sign in to comment