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

Commit 30249059 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix string use-after-free in mediaswcodec"

parents 156dc25a 272c895e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -71,10 +71,10 @@ binder::Status MediaCodecUpdateService::loadPlugins(const ::std::string& apkPath
        String8 libPathInApk = String8("lib/") + String8(abis[0].c_str());
        String8 defaultLibPath = String8(apkPath.c_str()) + "!/" + libPathInApk;
        String8 libPath = defaultLibPath + "/libmedia_codecserviceregistrant.so";
        String8 zipEntryPath = libPathInApk + "/libmedia_codecserviceregistrant.so";

        ZipEntry entry;
        ZipString name(libPathInApk + "/libmedia_codecserviceregistrant.so");
        ret = FindEntry(zipHandle, name, &entry);
        ret = FindEntry(zipHandle, ZipString(zipEntryPath), &entry);

        if (ret == 0) {
            android_namespace_t *codecNs = android_create_namespace("codecs",