mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: conf: Claim the proper range for signed numbers
virConfGetValueLLong() errors out if the value is too big to fit into a long long integer, but claims the supported range to be (0,LLONG_MAX) instead of (LLONG_MIN,LLONG_MAX).
This commit is contained in:
parent
1835cd530e
commit
a6a1cb6ae3
@ -1318,8 +1318,8 @@ int virConfGetValueLLong(virConfPtr conf,
|
|||||||
if (cval->type == VIR_CONF_ULONG) {
|
if (cval->type == VIR_CONF_ULONG) {
|
||||||
if (((unsigned long long)cval->l) > LLONG_MAX) {
|
if (((unsigned long long)cval->l) > LLONG_MAX) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
_("%s: value for '%s' parameter must be in range 0:%lld"),
|
_("%s: value for '%s' parameter must be in range %lld:%lld"),
|
||||||
conf->filename, setting, LLONG_MAX);
|
conf->filename, setting, LLONG_MIN, LLONG_MAX);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (cval->type != VIR_CONF_LONG) {
|
} else if (cval->type != VIR_CONF_LONG) {
|
||||||
|
Loading…
Reference in New Issue
Block a user