Commit 81ae20d403fb571c34db665a44641b2f4c1f2475

Thomas de Grivel 2024-10-08T20:56:28

fix uninitialized variable in http_request_buf_parse

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/http/http_request.c b/http/http_request.c
index 82f7555..a231383 100644
--- a/http/http_request.c
+++ b/http/http_request.c
@@ -85,7 +85,7 @@ s_tag * http_request_buf_parse (s_tag *req, s_buf *buf)
   s_str *body_str;
   const s_str content_length_str = {{NULL}, 14, {"Content-Length"}};
   uw          content_length_uw = 0;
-  s_str      *content_type;
+  s_str      *content_type = NULL;
   const s_str content_type_str = {{NULL}, 12, {"Content-Type"}};
   s_str *key;
   s_str line;