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-devel

[Xen-devel] [PATCH,MINI-OS] Fix fb/kbd initialization

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH,MINI-OS] Fix fb/kbd initialization
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Mon, 23 Nov 2009 01:13:58 +0100
Delivery-date: Sun, 22 Nov 2009 16:14:16 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
When allocating kbdfront and fbfront structures, we should zero them
since we do not initialize all fields.

Signed-Off-By: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>

diff -r bec27eb6f72c extras/mini-os/fbfront.c
--- a/extras/mini-os/fbfront.c  Sat Nov 14 10:32:59 2009 +0000
+++ b/extras/mini-os/fbfront.c  Mon Nov 23 01:12:31 2009 +0100
@@ -80,6 +80,7 @@
     printk("******************* KBDFRONT for %s **********\n\n\n", nodename);
 
     dev = malloc(sizeof(*dev));
+    memset(dev, 0, sizeof(*dev));
     dev->nodename = strdup(nodename);
 #ifdef HAVE_LIBC
     dev->fd = -1;
@@ -403,6 +404,7 @@
     printk("******************* FBFRONT for %s **********\n\n\n", nodename);
 
     dev = malloc(sizeof(*dev));
+    memset(dev, 0, sizeof(*dev));
     dev->nodename = strdup(nodename);
 #ifdef HAVE_LIBC
     dev->fd = -1;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH,MINI-OS] Fix fb/kbd initialization, Samuel Thibault <=