search for: f14eee3

Displaying 3 results from an estimated 3 matches for "f14eee3".

2017 Mar 03
1
Re: [PATCH 08/11] ocaml: do not try to malloc 0 elements in get_all_event_callbacks
...r of valid items > in the returned array, so there are no behaviour changes for callers of > get_all_event_callbacks. > --- > ocaml/guestfs-c.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c > index 9042752..f14eee3 100644 > --- a/ocaml/guestfs-c.c > +++ b/ocaml/guestfs-c.c > @@ -311,7 +311,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) > } > > /* Copy them into the return array. */ > - r = malloc (sizeof (value *) * (*len_rtn)); > + r = malloc (sizeof (value *)...
2017 Mar 03
0
[PATCH 08/11] ocaml: do not try to malloc 0 elements in get_all_event_callbacks
...#39;len_rtn' already keeps the number of valid items in the returned array, so there are no behaviour changes for callers of get_all_event_callbacks. --- ocaml/guestfs-c.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ocaml/guestfs-c.c b/ocaml/guestfs-c.c index 9042752..f14eee3 100644 --- a/ocaml/guestfs-c.c +++ b/ocaml/guestfs-c.c @@ -311,7 +311,7 @@ get_all_event_callbacks (guestfs_h *g, size_t *len_rtn) } /* Copy them into the return array. */ - r = malloc (sizeof (value *) * (*len_rtn)); + r = malloc (sizeof (value *) * (*len_rtn + 1)); if (r == NULL) cam...
2017 Mar 03
14
[PATCH 00/11] Various Coverity fixes
Hi, this patch series fixes some issues discovered by Coverity. Most of them are memory leaks, usually on error; there are also invalid memory access issues. Thanks, Pino Toscano (11): java: link libguestfs_jni against libutils java: fix invalid memory access for FBuffer in struct lists daemon: tsk: properly use GUESTFS_MAX_CHUNK_SIZE edit: fix small memory leak on error java: fix