From b7dddaa6853a404070265a2cfb8535e90f265801 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 6447ed93..5beb001f 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; } -- 2.11.4.GIT