storage: reject negative capacity

https://bugzilla.redhat.com/show_bug.cgi?id=1436119
This commit is contained in:
Ján Tomko 2017-03-27 14:33:16 +02:00
parent eeeaaa0b73
commit 2da7f545a3

View File

@ -1063,7 +1063,7 @@ virStorageSize(const char *unit,
const char *val,
unsigned long long *ret)
{
if (virStrToLong_ull(val, NULL, 10, ret) < 0) {
if (virStrToLong_ullp(val, NULL, 10, ret) < 0) {
virReportError(VIR_ERR_XML_ERROR, "%s",
_("malformed capacity element"));
return -1;