Re: [PATCH v2] completer: Doesn't alloc enough space for null terminated array of strings

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

 



On 07/12/2018 04:00 PM, Simon Kobyda wrote:
> Functions virshSecretEventNameCompleter, virshPoolEventNameCompleter,
> virshNodedevEventNameCompleter allocates only enough space
> for array of N strings.
> 
> However these are null terminated strings, so program needs to
> alloc space for array of N+1 strings.
> 
> How to replicate error: valgrind virsh, use completer for
> '-nodedev-event --event' or '-pool-event --event' or
> '-secret-event --event'.

Well, "-nodedev-event" is not a command, "nodedev-event" is ;-)

I'll fix these before pushing.

> 
> Signed-off-by: Simon Kobyda <skobyda@xxxxxxxxxx>
> 
> ---
> 
> Changes in V2:
>     - Added "Signed-off-by"
>     - Changed format of commit message to make it more
>     readable
> 
>  tools/virsh-completer.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)


ACKed and pushed.

Congratulations on your first libvirt contribution!

Michal

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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