You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
812 B

From 89693cb2ab6248d1d996e5c34a473bf6fac471c9 Mon Sep 17 00:00:00 2001
From: Claudio Matsuoka <cmatsuoka@gmail.com>
Date: Sun, 10 May 2015 17:56:12 -0300
Subject: [PATCH 6/8] Initialize uninitialized string
Local string buffer was being operated without proper initialization, causing
wcslen() to operate on invalid values.
Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
---
figlet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/figlet.c b/figlet.c
index 3de795a..9274f7f 100644
--- a/figlet.c
+++ b/figlet.c
@@ -1141,6 +1141,8 @@ inchr theord;
fcharlist->thechar = (outchr**)myalloc(sizeof(outchr*)*charheight);
fcharlist->next = fclsave;
+ outline[0] = 0;
+
for (row=0;row<charheight;row++) {
if (myfgets(templine,MAXLEN,file)==NULL) {
templine[0] = '\0';
--
2.5.0