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-3.4-testing] tools/xenconsole: fix Segmentation fau

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.4-testing] tools/xenconsole: fix Segmentation fault
From: "Xen patchbot-3.4-testing" <patchbot-3.4-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 08 Feb 2010 02:45:17 -0800
Delivery-date: Mon, 08 Feb 2010 02:45:38 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1265625438 0
# Node ID 5c8649303392c23df82ca02bc9a3f481455c7824
# Parent  e42b5532ac856e5f6f851e0e6d98af3315e533f4
tools/xenconsole: fix Segmentation fault

Segmentation fault occurs if DOMID isn't specified.
Some check be added to output error message in this situation.

Signed-off-by: Yu Zhiguo <yuzg@xxxxxxxxxxxxxx>
xen-unstable changeset:   20910:5e49312fcb44
xen-unstable date:        Mon Feb 08 08:50:03 2010 +0000
---
 tools/console/client/main.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -r e42b5532ac85 -r 5c8649303392 tools/console/client/main.c
--- a/tools/console/client/main.c       Mon Feb 08 10:36:53 2010 +0000
+++ b/tools/console/client/main.c       Mon Feb 08 10:37:18 2010 +0000
@@ -283,7 +283,13 @@ int main(int argc, char **argv)
                        argv[0]);
                exit(EINVAL);
        }
-       
+
+       if (optind >= argc) {
+               fprintf(stderr, "DOMID should be specified\n");
+               fprintf(stderr, "Try `%s --help' for more information.\n",
+                       argv[0]);
+               exit(EINVAL);
+       }
        domid = strtol(argv[optind], &end, 10);
        if (end && *end) {
                fprintf(stderr, "Invalid DOMID `%s'\n", argv[optind]);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.4-testing] tools/xenconsole: fix Segmentation fault, Xen patchbot-3.4-testing <=