From: David Goulet Date: Tue, 28 May 2013 18:57:05 +0000 (-0400) Subject: Fix: wrong size in memcpy of kernel channel padding X-Git-Url: http://git.efficios.com/?p=lttng-tools.git;a=commitdiff_plain;h=ea207e3b32e5159cfd9d1f15c36028bf707fc1ed Fix: wrong size in memcpy of kernel channel padding Issue 1019925 of coverity scan. Signed-off-by: David Goulet --- diff --git a/src/common/kernel-ctl/kernel-ctl.c b/src/common/kernel-ctl/kernel-ctl.c index b45efd0ef..d850f38c0 100644 --- a/src/common/kernel-ctl/kernel-ctl.c +++ b/src/common/kernel-ctl/kernel-ctl.c @@ -99,7 +99,7 @@ int kernctl_open_metadata(int fd, struct lttng_channel_attr *chops) channel.switch_timer_interval = chops->switch_timer_interval; channel.read_timer_interval = chops->read_timer_interval; channel.output = chops->output; - memcpy(channel.padding, chops->padding, sizeof(channel.padding)); + memcpy(channel.padding, chops->padding, sizeof(chops->padding)); return ioctl(fd, LTTNG_KERNEL_METADATA, &channel); } @@ -134,7 +134,7 @@ int kernctl_create_channel(int fd, struct lttng_channel_attr *chops) channel.switch_timer_interval = chops->switch_timer_interval; channel.read_timer_interval = chops->read_timer_interval; channel.output = chops->output; - memcpy(channel.padding, chops->padding, sizeof(channel.padding)); + memcpy(channel.padding, chops->padding, sizeof(chops->padding)); return ioctl(fd, LTTNG_KERNEL_CHANNEL, &channel); }