Skip to content

Commit e1ff117

Browse files
authored
fix: removed null terminator.
1 parent 2e1718e commit e1ff117

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ngx_http_lua_misc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ ngx_http_lua_ffi_set_resp_status_and_reason(ngx_http_request_t *r, int status,
103103
ngx_str_set(&r->headers_out.status_line, "101 Switching Protocols");
104104

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

0 commit comments

Comments
 (0)