From 77aefe99a8d5ba7360ef199ef34bc85edf34ec21 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 25 May 2011 23:21:36 -0400 Subject: [PATCH] Fix context append incorrect copy length Signed-off-by: Mathieu Desnoyers --- ltt-context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.34.1