Commit 7d8f253fcadbc4616e380e51b642fddbf1ab297b

Martin Mitas 2018-11-18T11:24:37

md_enter_leave_span_a: Fix calling md_free_attribute() on uninitialized data. (Coverity issue CID 1475544)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git a/md4c/md4c.c b/md4c/md4c.c
index d81e804..b93aa19 100644
--- a/md4c/md4c.c
+++ b/md4c/md4c.c
@@ -3836,8 +3836,8 @@ md_enter_leave_span_a(MD_CTX* ctx, int enter, MD_SPANTYPE type,
                       const CHAR* dest, SZ dest_size, int prohibit_escapes_in_dest,
                       const CHAR* title, SZ title_size)
 {
-    MD_ATTRIBUTE_BUILD href_build;
-    MD_ATTRIBUTE_BUILD title_build;
+    MD_ATTRIBUTE_BUILD href_build = { 0 };
+    MD_ATTRIBUTE_BUILD title_build = { 0 };
     MD_SPAN_A_DETAIL det;
     int ret = 0;