mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 14:38:13 +02:00
Merge branch 'testfix' into 'master'
Zero terminate temp buffers before calling strcat. See merge request cairo/cairo!369
This commit is contained in:
commit
12cd2bcbb2
1 changed files with 1 additions and 0 deletions
|
|
@ -127,6 +127,7 @@ draw (cairo_t *cr, int width, int height)
|
||||||
cairo_set_font_size (cr, FONT_SIZE);
|
cairo_set_font_size (cr, FONT_SIZE);
|
||||||
|
|
||||||
text = malloc (strlen(WORD) * NUM_WORDS + 1);
|
text = malloc (strlen(WORD) * NUM_WORDS + 1);
|
||||||
|
text[0] = '\0';
|
||||||
for (i = 0; i < NUM_WORDS; i++)
|
for (i = 0; i < NUM_WORDS; i++)
|
||||||
strcat (text, WORD);
|
strcat (text, WORD);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue