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

Skip to content
Commit 58919204 authored by Gopalakrishnan Nallasamy's avatar Gopalakrishnan Nallasamy
Browse files

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
parent 02a8b88c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment