Re: [PATCH v2 1/3] vircommand: Ensure buffers are NULL-terminated

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 13, 2019 at 01:04:06PM +0100, Andrea Bolognani wrote:
> The memory allocated by VIR_REALLOC_N() is uninitialized,
> which means it's not possible to figure out whether any
> output was produced at all after the fact.
> 
> Since we don't care about the previous contents of buffers,
> if any, use VIR_FREE() followed by VIR_ALLOC_N() instead.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  src/util/vircommand.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)


Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux