Pino Toscano 64e1101631 ocaml: do not try to malloc 0 elements in get_all_event_callbacks
In case there are no event handlers registered with the handle,
get_all_event_callbacks will count 0 elements, trying to malloc a buffer
of that size.  POSIX says that this can result in either a null pointer,
or an unusable pointer.

Short-circuit get_all_event_callbacks to allocate nothing when there are
no events, making sure to use its results only when there were events.
2017-03-06 09:02:02 +01:00
2017-02-15 15:05:47 +00:00
2017-02-15 14:44:13 +01:00
2017-01-03 16:48:21 +01:00
2017-01-26 15:05:46 +00:00
2017-03-03 16:36:27 +01:00
2017-02-15 14:44:13 +01:00
2017-01-26 15:05:46 +00:00
2017-01-26 15:05:46 +00:00
2017-01-26 15:05:46 +00:00
2017-01-26 15:05:46 +00:00
2017-02-28 09:18:05 +00:00
2017-02-28 09:18:05 +00:00
2017-02-28 20:56:38 +00:00
2017-01-26 15:05:46 +00:00
2017-02-28 09:18:05 +00:00
2017-02-28 20:56:38 +00:00
2013-01-24 15:00:49 +00:00
2016-07-14 15:44:03 +01:00
2017-02-28 09:18:05 +00:00
2017-01-26 15:05:46 +00:00
2017-02-28 09:53:42 +00:00
2017-01-26 15:05:46 +00:00
2017-01-03 16:48:21 +01:00
2017-01-03 16:48:21 +01:00
2017-01-26 15:05:46 +00:00
2017-01-03 16:48:21 +01:00
2017-01-03 16:48:21 +01:00
2016-02-10 14:15:05 +01:00

Libguestfs is tools and a library for accessing and modifying guest
disk images.  For more information see the home page:

  http://libguestfs.org/

For discussion, development, patches, etc. please use the mailing
list:

  http://www.redhat.com/mailman/listinfo/libguestfs

To find out how to build libguestfs from source, read:

  docs/guestfs-building.pod
  http://libguestfs.org/guestfs-building.1.html
  man docs/guestfs-building.1

Copyright (C) 2009-2017 Red Hat Inc.

The library is distributed under the LGPLv2+.  The programs are
distributed under the GPLv2+.  Please see the files COPYING and
COPYING.LIB for full license information.  The examples are under a
very liberal license.
Languages
C 42.7%
OCaml 35.5%
Shell 7.1%
Makefile 4%
Perl 2.6%
Other 8%