Zero terminate temp buffers before calling strcat.

This commit is contained in:
Jussi Pakkanen 2022-11-23 23:21:15 +02:00
parent 8cb6deed39
commit 44ff5e4e6c

View file

@ -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);