diff --git a/test/pdf-operators-text.c b/test/pdf-operators-text.c index 556b9d7d8..6d654d115 100644 --- a/test/pdf-operators-text.c +++ b/test/pdf-operators-text.c @@ -127,6 +127,7 @@ draw (cairo_t *cr, int width, int height) cairo_set_font_size (cr, FONT_SIZE); text = malloc (strlen(WORD) * NUM_WORDS + 1); + text[0] = '\0'; for (i = 0; i < NUM_WORDS; i++) strcat (text, WORD);