summaryrefslogtreecommitdiff
path: root/parser.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2003-10-07 21:25:12 +0000
committerDaniel Veillard <veillard@src.gnome.org>2003-10-07 21:25:12 +0000
commitd96f6d34295c8ce73c15c60115e970132e6fd18e (patch)
treedec752a3b14b8928cd03566f5acf4ff56448c800 /parser.c
parent6edbfbbe66e45fb6aab998b3a057fae28daf9ce6 (diff)
downloadlibxml2-d96f6d34295c8ce73c15c60115e970132e6fd18e.tar.gz
cleaning up XPath error reporting that time. applied the two patches for
* error.c include/libxml/xmlerror.h include/libxml/xpath.h include/libxml/xpathInternals.h xpath.c: cleaning up XPath error reporting that time. * threads.c: applied the two patches for TLS threads on Windows from Jesse Pelton * parser.c: tiny safety patch for xmlStrPrintf() make sure the return is always zero terminated. Should also help detecting passing wrong buffer size easilly. * result/VC/* result/valid/rss.xml.err result/valid/xlink.xml.err: updated the results to follow the errors string generated by last commit. Daniel
Diffstat (limited to 'parser.c')
-rw-r--r--parser.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/parser.c b/parser.c
index e5ce1dac..33fe5ee8 100644
--- a/parser.c
+++ b/parser.c
@@ -2449,6 +2449,7 @@ xmlStrPrintf(xmlChar *buf, int len, const xmlChar *msg, ...) {
va_start(args, msg);
ret = vsnprintf((char *) buf, len, (const char *) msg, args);
va_end(args);
+ buf[len - 1] = 0; /* be safe ! */
return(ret);
}