Fix for figlet
PATCH 1/1 Fix for figlet
Hello!
There's a fix for figlet, which prevents accessing a char[] array with a negative index.
The patch applies to xen/tools/figlet/figlet.c The fix has been taken from the OpenBSD ports tree:
http://www.openbsd.org/cgi-bin/cvsweb/ports/misc/figlet/patches/patch-figlet_c
It works for me.
xen/tools/figlet/figlet.c +3 -2
@@ -1448,8 +1448,9 @@ inchr c; }else {for (k=0 ;k<smushamount;k++) { - outputline[row][outlinelen-smushamount+k] = -smushem (outputline[row][outlinelen-smushamount+k],currchar[row][k]); +if (outlinelen-smushamount+k >=0 ) + outputline[row][outlinelen-smushamount+k] = +smushem (outputline[row][outlinelen-smushamount+k],currchar[row][k]); }strcat (outputline[row],currchar[row]+smushamount); }
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel