diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 39ff798ab3b5f722d6ad49b763ea39ecae685e5d..ed2e3eab5f2d8508827c889dcd40ff777c05871d 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -2000,7 +2000,7 @@ cmdBlockCopy(vshControl *ctl, const vshCmd *cmd) if (bandwidth) { /* bandwidth is ulong MiB/s, but the typed parameter is * ullong bytes/s; make sure we don't overflow */ - if (bandwidth > ULLONG_MAX >> 20) { + if (bandwidth + 0ULL > ULLONG_MAX >> 20) { virReportError(VIR_ERR_OVERFLOW, _("bandwidth must be less than %llu"), ULLONG_MAX >> 20);