mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-04 04:00:19 +01:00
Zero terminate temp buffers before calling strcat.
This commit is contained in:
parent
8cb6deed39
commit
44ff5e4e6c
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);
|
||||
|
||||
text = malloc (strlen(WORD) * NUM_WORDS + 1);
|
||||
text[0] = '\0';
|
||||
for (i = 0; i < NUM_WORDS; i++)
|
||||
strcat (text, WORD);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue