virCheckFlags(0, -1);
- if (*nparams < 3) {
- ESX_ERROR(VIR_ERR_INVALID_ARG, "%s",
- _("Parameter array must have space for 3 items"));
- return -1;
- }
-
if (esxVI_EnsureSession(priv->primary) < 0) {
return -1;
}
}
for (dynamicProperty = virtualMachine->propSet;
- dynamicProperty != NULL && mask != 7 && i < 3;
+ dynamicProperty != NULL && mask != 7 && i < 3 && i < *nparams;
dynamicProperty = dynamicProperty->_next) {
if (STREQ(dynamicProperty->name, "config.cpuAllocation.reservation") &&
! (mask & (1 << 0))) {
return 0;
}
- if (*nparams < 1) {
- ESX_ERROR(VIR_ERR_INVALID_ARG, "%s",
- _("Parameter array must have space for 1 item"));
- return -1;
- }
-
if (esxVI_EnsureSession(priv->primary) < 0) {
return -1;
}