All of lore.kernel.org
 help / color / mirror / Atom feed
* [BABELTRACE PATCH 2/2] Fix: sanity check in iterator creation
       [not found] <1416333152-12536-1-git-send-email-jdesfossez@efficios.com>
@ 2014-11-18 17:52 ` Julien Desfossez
       [not found] ` <1416333152-12536-2-git-send-email-jdesfossez@efficios.com>
  1 sibling, 0 replies; 2+ messages in thread
From: Julien Desfossez @ 2014-11-18 17:52 UTC (permalink / raw)
  To: jgalar; +Cc: lttng-dev, Julien Desfossez

This function is part of the API, so we need more sanity checks before
using the structures provided by the caller.

Refs: #827

Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
---
 lib/iterator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/iterator.c b/lib/iterator.c
index d2464ab..540d5e9 100644
--- a/lib/iterator.c
+++ b/lib/iterator.c
@@ -720,7 +720,7 @@ int bt_iter_init(struct bt_iter *iter,
 	int i;
 	int ret = 0;
 
-	if (!iter || !ctx)
+	if (!iter || !ctx || !ctx->tc || !ctx->tc->array)
 		return -EINVAL;
 
 	if (ctx->current_iterator) {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [BABELTRACE PATCH 2/2] Fix: sanity check in iterator creation
       [not found] ` <1416333152-12536-2-git-send-email-jdesfossez@efficios.com>
@ 2014-12-02 16:16   ` Jérémie Galarneau
  0 siblings, 0 replies; 2+ messages in thread
From: Jérémie Galarneau @ 2014-12-02 16:16 UTC (permalink / raw)
  To: Julien Desfossez; +Cc: lttng-dev, Jeremie Galarneau

Both patches were merged in master and stable-1.2.

Thanks!
Jérémie

On Tue, Nov 18, 2014 at 12:52 PM, Julien Desfossez
<jdesfossez@efficios.com> wrote:
> This function is part of the API, so we need more sanity checks before
> using the structures provided by the caller.
>
> Refs: #827
>
> Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
> ---
>  lib/iterator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/iterator.c b/lib/iterator.c
> index d2464ab..540d5e9 100644
> --- a/lib/iterator.c
> +++ b/lib/iterator.c
> @@ -720,7 +720,7 @@ int bt_iter_init(struct bt_iter *iter,
>         int i;
>         int ret = 0;
>
> -       if (!iter || !ctx)
> +       if (!iter || !ctx || !ctx->tc || !ctx->tc->array)
>                 return -EINVAL;
>
>         if (ctx->current_iterator) {
> --
> 1.9.1
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com

_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-12-02 16:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1416333152-12536-1-git-send-email-jdesfossez@efficios.com>
2014-11-18 17:52 ` [BABELTRACE PATCH 2/2] Fix: sanity check in iterator creation Julien Desfossez
     [not found] ` <1416333152-12536-2-git-send-email-jdesfossez@efficios.com>
2014-12-02 16:16   ` Jérémie Galarneau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.