Merge branch 'testfix' into 'master'

Zero terminate temp buffers before calling strcat.

See merge request cairo/cairo!369
This commit is contained in:
Uli Schlachter 2022-11-25 13:23:31 +00:00
commit 12cd2bcbb2

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