projects
/
ccan
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1988b0b
)
ttxml: zero terminate the buffer after checking it was allocated
author
Daniel Burke
<dan.p.burke@gmail.com>
Fri, 9 Sep 2011 12:29:32 +0000
(21:59 +0930)
committer
Daniel Burke
<dan.p.burke@gmail.com>
Fri, 9 Sep 2011 12:29:32 +0000
(21:59 +0930)
ccan/ttxml/ttxml.c
patch
|
blob
|
history
diff --git
a/ccan/ttxml/ttxml.c
b/ccan/ttxml/ttxml.c
index 03b101d6e8f951362c7cdacaf9a5a58e01bae15d..e953ba2390262cf221817671b261fc06cd7e77f0 100644
(file)
--- a/
ccan/ttxml/ttxml.c
+++ b/
ccan/ttxml/ttxml.c
@@
-337,10
+337,10
@@
XmlNode* xml_load(const char * filename)
return NULL;
xml.buf = malloc(BUFFER+1);
- xml.buf[BUFFER]=0;
- xml.len = BUFFER;
if(!xml.buf)
goto xml_load_fail_malloc_buf;
+ xml.buf[BUFFER]=0;
+ xml.len = BUFFER;
xml_read_file(&xml);