From 782a3a6f39aa4f287849d7978e02b3b0bd4ffb2f Mon Sep 17 00:00:00 2001 From: Robin Stuart Date: Sat, 13 Jan 2018 15:45:26 +0000 Subject: [PATCH] Include terminator in esc processed string Attempts to fix #89 reported by Matt Johnson --- backend/library.c | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/library.c b/backend/library.c index 6e4b9824..4b1292b0 100644 --- a/backend/library.c +++ b/backend/library.c @@ -874,6 +874,7 @@ int escape_char_process(struct zint_symbol *symbol, unsigned char *input_string, } while (in_posn < *length); memcpy(input_string, escaped_string, out_posn); + input_string[out_posn] = '\0'; *length = out_posn; error_number = 0;