From f5e437a100376e1468028b90fb570c343f4b6e0d Mon Sep 17 00:00:00 2001 From: default Date: Tue, 13 Jun 2023 22:09:20 +0200 Subject: [PATCH] Fixed crash in check_signature(). --- http.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/http.c b/http.c index 75769f2..6540dcc 100644 --- a/http.c +++ b/http.c @@ -132,6 +132,11 @@ int check_signature(snac *snac, xs_dict *req, xs_str **err) char *pubkey; char *p; + if (xs_is_null(sig_hdr)) { + *err = xs_fmt("missing 'signature' header"); + return 0; + } + { /* extract the values */ xs *l = xs_split(sig_hdr, ",");