summaryrefslogtreecommitdiff
path: root/debian/patches/0042-HTMLparser-Correctly-initialise-a-stack-allocated-st.patch
blob: e991045c458994b9db2d110d9be5d9ee399d5340 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Philip Withnall <philip.withnall@collabora.co.uk>
Date: Fri, 20 Jun 2014 21:03:42 +0100
Subject: HTMLparser: Correctly initialise a stack allocated structure
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

If not initialised, the ‘node’ member remains undefined.

Coverity issue: #60466

https://bugzilla.gnome.org/show_bug.cgi?id=731990
---
 HTMLparser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/HTMLparser.c b/HTMLparser.c
index 79b1adf..4c51cc5 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -4366,7 +4366,7 @@ static void
 htmlParseElementInternal(htmlParserCtxtPtr ctxt) {
     const xmlChar *name;
     const htmlElemDesc * info;
-    htmlParserNodeInfo node_info;
+    htmlParserNodeInfo node_info = { 0, };
     int failed;
 
     if ((ctxt == NULL) || (ctxt->input == NULL)) {