diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-09-15 10:59:18 +0100 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2006-09-15 10:59:18 +0100 |
commit | e082c0eae9aff551c95b32acfda068247850f179 (patch) | |
tree | 419539081f64de1fb7d3cc382f5cc0f2e8699733 /xen/tools | |
parent | fe9a681dcffc1b9284c3a4ee5172ca83f2bd9949 (diff) | |
download | xen-e082c0eae9aff551c95b32acfda068247850f179.tar.gz xen-e082c0eae9aff551c95b32acfda068247850f179.tar.bz2 xen-e082c0eae9aff551c95b32acfda068247850f179.zip |
[XEN] Fix array ngative accesses in figlet tool.
Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/tools')
-rw-r--r-- | xen/tools/figlet/figlet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/xen/tools/figlet/figlet.c b/xen/tools/figlet/figlet.c index 8e79e83170..5d02ad51fd 100644 --- a/xen/tools/figlet/figlet.c +++ b/xen/tools/figlet/figlet.c @@ -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); } |