Skip to content

Commit

Permalink
fix: remove null terminator
Browse files Browse the repository at this point in the history
  • Loading branch information
n-bes authored Sep 24, 2024
1 parent 2e1718e commit f84c32a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ngx_http_lua_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ ngx_http_lua_ffi_set_resp_status_and_reason(ngx_http_request_t *r, int status,
ngx_str_set(&r->headers_out.status_line, "101 Switching Protocols");

} else if (reason != NULL && reason_len > 0) {
reason_len += 5; /* "ddd <reason>\0" */
reason_len += 4; /* "ddd <reason>" */
buf = ngx_palloc(r->pool, reason_len);
if (buf == NULL) {
ngx_log_error(NGX_LOG_ERR, r->connection->log, 0, "no memory");
Expand Down

0 comments on commit f84c32a

Please # to comment.