initialize error string to avoid returning garbage

This commit is contained in:
Omar Polo 2020-12-28 17:50:26 +01:00
parent 3d9a1c73de
commit b3deee7b38
No known key found for this signature in database
GPG Key ID: 35F98C96A1786F0D
1 changed files with 1 additions and 0 deletions

1
gmid.c
View File

@ -514,6 +514,7 @@ handle(struct pollfd *fds, struct client *client)
return;
}
parse_err = "invalid request";
if (!trim_req_uri(buf) || !parse_uri(buf, &uri, &parse_err)) {
if (!start_reply(fds, client, BAD_REQUEST, parse_err))
return;