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

Commit 9b2ccd68 authored by Lajos Molnar's avatar Lajos Molnar Committed by Android Git Automerger
Browse files

am f839b8b4: Merge "Fix M3UParser relative path handling."

* commit 'f839b8b4':
  Fix M3UParser relative path handling.
parents 10fad6ad f839b8b4
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -398,6 +398,8 @@ static bool MakeURL(const char *baseURL, const char *url, AString *out) {
        // Base URL must be absolute
        return false;
    }
    const size_t schemeEnd = (strstr(baseURL, "//") - baseURL) + 2;
    CHECK(schemeEnd == 7 || schemeEnd == 8);

    if (!strncasecmp("http://", url, 7) || !strncasecmp("https://", url, 8)) {
        // "url" is already an absolute URL, ignore base URL.
@@ -442,7 +444,7 @@ static bool MakeURL(const char *baseURL, const char *url, AString *out) {

        // Check whether the found slash actually is part of the path
        // and not part of the "http://".
        if (end > 6) {
        if (end >= schemeEnd) {
            out->setTo(baseURL, end);
        } else {
            out->setTo(baseURL);