mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2025-12-29 04:30:11 +01: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);
|
||||
|
||||
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