aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-09 00:15:39 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2023-09-09 00:15:39 +0200
commitdf873a988ca42d79d87acac160fdab797cb3d16d (patch)
tree67fc5eb0d8b9849bf4e6844fb410fbcc78681b3f
parent93b146a8a89b2e636fbea41a45864175982e42c1 (diff)
downloadslcl-df873a988ca42d79d87acac160fdab797cb3d16d.tar.gz
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.
-rw-r--r--main.c1
1 files changed, 1 insertions, 0 deletions
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)))