From: Mathieu Desnoyers Date: Thu, 26 May 2011 03:21:36 +0000 (-0400) Subject: Fix context append incorrect copy length X-Git-Tag: v2.0-pre1~78 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=77aefe99a8d5ba7360ef199ef34bc85edf34ec21;p=lttng-modules.git Fix context append incorrect copy length Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-context.c b/ltt-context.c index 961d80e1..e0cd073c 100644 --- a/ltt-context.c +++ b/ltt-context.c @@ -33,7 +33,7 @@ struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx_p) if (!new_fields) return NULL; if (ctx->fields) - memcpy(new_fields, ctx->fields, ctx->nr_fields); + memcpy(new_fields, ctx->fields, sizeof(*ctx->fields) * ctx->nr_fields); kfree(ctx->fields); ctx->fields = new_fields; }