diff --git a/services/httpd/handler.go b/services/httpd/handler.go index 1152271a38c..2cf1b8a25bc 100644 --- a/services/httpd/handler.go +++ b/services/httpd/handler.go @@ -461,7 +461,7 @@ func (h *Handler) serveWriteLine(w http.ResponseWriter, r *http.Request, body [] } // check that the byte is in the standard ascii code range - if body[i] > 32 { + if body[i] > 32 || i >= len(body)-1 { break } i += 1