From 9efa2eab698f83f1f3ed7df14af83c28c002bca7 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 29 Jun 2018 13:03:51 +0200 Subject: dashboard/app: allow empty CompilerID in Build Some OSes don't require a compiler. --- dashboard/app/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dashboard/app/api.go b/dashboard/app/api.go index 1bd9be48d..c7c3248cc 100644 --- a/dashboard/app/api.go +++ b/dashboard/app/api.go @@ -286,8 +286,8 @@ func uploadBuild(c context.Context, now time.Time, ns string, req *dashapi.Build if err := checkStrLen(req.SyzkallerCommit, "Build.SyzkallerCommit", MaxStringLen); err != nil { return false, err } - if err := checkStrLen(req.CompilerID, "Build.CompilerID", MaxStringLen); err != nil { - return false, err + if len(req.CompilerID) > MaxStringLen { + return false, fmt.Errorf("Build.CompilerID is too long (%v)", len(req.CompilerID)) } if err := checkStrLen(req.KernelCommit, "Build.KernelCommit", MaxStringLen); err != nil { return false, err -- cgit mrf-deployment