From 7e862059020842605b73d250ae99c95ac70d5d91 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 18 Mar 2007 12:36:33 +0200 Subject: [PATCH] add_html_to_string: Also restore the '\0' terminator. --- src/util/conv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/conv.c b/src/util/conv.c index 6447ed93e..5beb001f3 100644 --- a/src/util/conv.c +++ b/src/util/conv.c @@ -284,6 +284,7 @@ add_html_to_string(struct string *string, const unsigned char *src, int len) || !add_long_to_string(string, (long) *src) || !add_char_to_string(string, ';')) { string->length = rollback_length; + string->source[rollback_length] = '\0'; return NULL; }