Fix context append incorrect copy length
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 May 2011 03:21:36 +0000 (23:21 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 26 May 2011 03:21:36 +0000 (23:21 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-context.c

index 961d80e111fcf25d57d48b332b3b58360e31bdff..e0cd073c9c09d854c236b23bb370a224546a8a6a 100644 (file)
@@ -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;
        }
This page took 0.027957 seconds and 4 git commands to generate.