Merge "Limit namespace length." into udc-dev

This commit is contained in:
TreeHugger Robot
2023-05-09 04:34:26 +00:00
committed by Android (Google) Code Review

View File

@@ -4124,6 +4124,10 @@ public class JobSchedulerService extends com.android.server.SystemService
if (namespace.isEmpty()) { if (namespace.isEmpty()) {
throw new IllegalArgumentException("namespace cannot be empty"); throw new IllegalArgumentException("namespace cannot be empty");
} }
if (namespace.length() > 1000) {
throw new IllegalArgumentException(
"namespace cannot be more than 1000 characters");
}
namespace = namespace.intern(); namespace = namespace.intern();
} }
return namespace; return namespace;