Commit ce859a2e authored by Daniel Burke's avatar Daniel Burke

ttxml: zero terminate the buffer after checking it was allocated

parent 1988b0b6
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment