From df873a988ca42d79d87acac160fdab797cb3d16d Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sat, 9 Sep 2023 00:15:39 +0200 Subject: main.c: Return 1 on null buffer Malformed POST requests might include no payload data. However, this is not considered a fatal error, but wrong user input. --- main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/main.c b/main.c index 45da68f..16d1878 100644 --- a/main.c +++ b/main.c @@ -215,6 +215,7 @@ static int get_forms(const struct http_payload *const pl, if (!ref) { fprintf(stderr, "%s: expected non-NULL buffer\n", __func__); + ret = 1; goto end; } else if (!(dup = strndup(ref, p->n))) -- cgit v1.2.3