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

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

Merge "Fix the crash when parsing empty config."

parents 59c31de1 bbd056ac
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -725,7 +725,7 @@ Status StatsService::addConfiguration(int64_t key,
    if (checkCallingPermission(String16(kPermissionDump))) {
        ConfigKey configKey(ipc->getCallingUid(), key);
        StatsdConfig cfg;
        if (!cfg.ParseFromArray(&config[0], config.size())) {
        if (config.empty() || !cfg.ParseFromArray(&config[0], config.size())) {
            *success = false;
            return Status::ok();
        }