WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN] Fix array ngative accesses in figle

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN] Fix array ngative accesses in figlet tool.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Sun, 17 Sep 2006 17:00:24 +0000
Delivery-date: Sun, 17 Sep 2006 10:01:32 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e87e5d216c0b0243342487256e820aa5b5950d89
# Parent  65b33e64b6421fbc8bcb266ecd65278953b75cb1
[XEN] Fix array ngative accesses in figlet tool.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/tools/figlet/figlet.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff -r 65b33e64b642 -r e87e5d216c0b xen/tools/figlet/figlet.c
--- a/xen/tools/figlet/figlet.c Thu Sep 14 16:01:46 2006 +0100
+++ b/xen/tools/figlet/figlet.c Fri Sep 15 10:59:18 2006 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN] Fix array ngative accesses in figlet tool., Xen patchbot-unstable <=