diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-09-07 13:40:11 +0200 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2023-09-07 13:45:10 +0200 |
| commit | 083dedbb9d068caed31b8c92ba69fc88ab80d009 (patch) | |
| tree | 7aef6d68f1929926dc7daca146a5ecffb2879a17 | |
| parent | f6562ddab30feb4bb63d9cda9801dbf607c33d07 (diff) | |
http.c: Return error if check_length fails
Otherwise, fatal errors coming from the h->cfg.length would be
unnoticed, causing slweb to attempt to send a response.
| -rw-r--r-- | http.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -1050,6 +1050,13 @@ static int header_cr_line(struct http_ctx *const h) if (res) { + if (res < 0) + { + fprintf(stderr, "%s: check_length failed\n", + __func__); + return res; + } + h->wctx.close = true; return start_response(h); } |
