]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/virsh.c: patch from Masayuki Sunou, checking that byte
authorDaniel Veillard <veillard@redhat.com>
Mon, 19 Mar 2007 09:46:13 +0000 (09:46 +0000)
committerDaniel Veillard <veillard@redhat.com>
Mon, 19 Mar 2007 09:46:13 +0000 (09:46 +0000)
  values passed to virsh memory commands are positive.
Daniel

ChangeLog
src/virsh.c

index c01db2b156c33eeb9bfa56e4c0c7732c594fa24e..808cf31f2b676236ca84d2b3876d7e9dabf065eb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Mar 19 10:44:25 CET 2007 Daniel Veillard <veillard@redhat.com>
+
+       * src/virsh.c: patch from Masayuki Sunou, checking that byte
+         values passed to virsh memory commands are positive.
+
 Fri Mar 16 20:30:20 CET 2007 Daniel Veillard <veillard@redhat.com>
 
        * NEWS libvirt.spec.in docs/libvir.html docs/news.html: preparing
index 2b80f651f39194b55d540e383d8405bbabba3211..521e2fcc8a9a2f0a0859b7e3df9867126a657fd9 100644 (file)
@@ -1459,7 +1459,7 @@ cmdSetmem(vshControl * ctl, vshCmd * cmd)
         return FALSE;
 
     bytes = vshCommandOptInt(cmd, "bytes", &bytes);
-    if (!bytes) {
+    if (bytes <= 0) {
         virDomainFree(dom);
         return FALSE;
     }
@@ -1502,7 +1502,7 @@ cmdSetmaxmem(vshControl * ctl, vshCmd * cmd)
         return FALSE;
 
     bytes = vshCommandOptInt(cmd, "bytes", &bytes);
-    if (!bytes) {
+    if (bytes <= 0) {
         virDomainFree(dom);
         return FALSE;
     }