The virJSONValueArraySize() function return ssize_t (with possibly returning -1 if the passed json is not an array). Storing the return value into size_t is possibly dangerous then. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/util/virqemu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virqemu.c b/src/util/virqemu.c index a1ba562..0b516fc 100644 --- a/src/util/virqemu.c +++ b/src/util/virqemu.c @@ -85,7 +85,7 @@ virQEMUBuildCommandLineJSONArrayNumbered(const char *key, virBufferPtr buf) { const virJSONValue *member; - size_t nelems = virJSONValueArraySize(array); + ssize_t nelems = virJSONValueArraySize(array); char *prefix = NULL; size_t i; int ret = 0; -- 2.8.4 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list