[libvirt] [PATCH] util.c (two more): don't use a negative value as allocation size

Matthias Bolte matthias.bolte at googlemail.com
Mon Feb 1 21:13:18 UTC 2010


2010/2/1 Jim Meyering <jim at meyering.net>:
> This change is nearly identical to one I made last week.
> I inspected all remaining sysconf uses, and they seem to be ok.
>
> >From 77add8762c5d00db11bb588b7ea0c9e00975c183 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering at redhat.com>
> Date: Mon, 1 Feb 2010 21:45:06 +0100
> Subject: [PATCH] util.c (two more): don't use a negative value as allocation size
>
> * src/util/util.c (virGetUserID, virGetGroupID): In the unlikely event
> that sysconf(_SC_GETPW_R_SIZE_MAX) fails, don't use -1 as the size in
> the subsequent allocation.
> ---

ACK

Matthias




More information about the libvir-list mailing list