[PATCH 0/3] Fix remote dispatch code trying to allocate 0-sized return buffers

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

 



This happens because of the switch to glib whose method g_malloc0 actually
correctly returns NULL on size 0 which doesn't make sense to do. The outcome of
that is that because virAllocN always returns 0, the dispatch code never fails
allocation and passes the NULL pointer to the server-side public API which
actually checks that and fails.

https://bugzilla.redhat.com/show_bug.cgi?id=1772842

Erik Skultety (3):
  rpc: gendispatch: Fix a couple of places adding trailing spaces
  rpc: gendispatch: Add a check for zero size client-side buffers
  libvirt-domain: virConnectListDomains: Return 0 on zero-size buffer

 src/libvirt-domain.c   |  3 +++
 src/rpc/gendispatch.pl | 12 ++++++++++--
 2 files changed, 13 insertions(+), 2 deletions(-)

-- 
2.23.0

--
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