소스 검색

Fixed crash in check_signature().

default 3 년 전
부모
커밋
f5e437a100
1개의 변경된 파일과 5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      http.c

+ 5 - 0
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, ",");