Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix points write panic #4591

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion services/httpd/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see what you are doing. Basically, if it's not JSON by index (len-1) (and not a valid ASCII character either), it's not JSON at all. Is that what you're getting at?

break
}
i += 1
Expand Down