Fix: wrong size in memcpy of kernel channel padding
authorDavid Goulet <dgoulet@efficios.com>
Tue, 28 May 2013 18:57:05 +0000 (14:57 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Tue, 28 May 2013 18:57:05 +0000 (14:57 -0400)
Issue 1019925 of coverity scan.

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/common/kernel-ctl/kernel-ctl.c

index b45efd0efa1dc7e6b5e8520419d9f7f6dff99ebd..d850f38c0337bdf53bc690f15240a82163ac66f8 100644 (file)
@@ -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);
 }
This page took 0.026247 seconds and 4 git commands to generate.