Skip to content
Snippets Groups Projects
Commit d6761e87 authored by Andy Green's avatar Andy Green
Browse files

coverity 169272 - off-by-one possible on CGI buffer limit

parent d8e051dd
Branches
Tags
No related merge requests found
......@@ -248,7 +248,7 @@ lws_callback_http_dummy(struct lws *wsi, enum lws_callback_reasons reason,
break;
case LWS_STDERR:
n = read(lws_get_socket_fd(args->stdwsi[LWS_STDERR]),
buf, sizeof(buf) - 1);
buf, sizeof(buf) - 2);
if (n > 0) {
if (buf[n - 1] != '\n')
buf[n++] = '\n';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment