From: Daniel Veillard Date: Mon, 19 Mar 2007 09:46:13 +0000 (+0000) Subject: * src/virsh.c: patch from Masayuki Sunou, checking that byte X-Git-Tag: LIBVIRT_0_2_2~47 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3edfdbf02db907c6d92b80071c8136f0556edba0;p=thirdparty%2Flibvirt.git * src/virsh.c: patch from Masayuki Sunou, checking that byte values passed to virsh memory commands are positive. Daniel --- diff --git a/ChangeLog b/ChangeLog index c01db2b156..808cf31f2b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 19 10:44:25 CET 2007 Daniel Veillard + + * 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 * NEWS libvirt.spec.in docs/libvir.html docs/news.html: preparing diff --git a/src/virsh.c b/src/virsh.c index 2b80f651f3..521e2fcc8a 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -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; }