summaryrefslogtreecommitdiff
path: root/test/pdf-operators-text.c
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2022-11-23 23:21:15 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2022-11-24 22:41:36 +0200
commit44ff5e4e6c92e81829f1adb3383d8eb788ba42c6 (patch)
tree2c882b45094e3b428197096d8880c2bfd3a10c48 /test/pdf-operators-text.c
parent8cb6deed39c7ac0d4a09ab4537cd0005ac738121 (diff)
downloadcairo-44ff5e4e6c92e81829f1adb3383d8eb788ba42c6.tar.gz
Zero terminate temp buffers before calling strcat.
Diffstat (limited to 'test/pdf-operators-text.c')
-rw-r--r--test/pdf-operators-text.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/pdf-operators-text.c b/test/pdf-operators-text.c
index 556b9d7d8..6d654d115 100644
--- a/test/pdf-operators-text.c
+++ b/test/pdf-operators-text.c
@@ -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);