aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2018-03-01 17:58:10 +0100
committercbdev <cb@cbcdn.com>2018-03-01 17:58:10 +0100
commitf307934129e4f5310cbd89ec739d47b0e031951f (patch)
tree2b889345899600099fc5cda0965202b959eaa16f
parent42273a1b62d9653bbbeaff5c7646117d8b55d78a (diff)
downloadmidimonster-f307934129e4f5310cbd89ec739d47b0e031951f.tar.gz
midimonster-f307934129e4f5310cbd89ec739d47b0e031951f.tar.bz2
midimonster-f307934129e4f5310cbd89ec739d47b0e031951f.zip
Fix short memcpy
-rw-r--r--sacn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sacn.c b/sacn.c
index 822f178..417fc32 100644
--- a/sacn.c
+++ b/sacn.c
@@ -517,7 +517,7 @@ static void sacn_discovery(size_t fd){
pdu.data.flags = htobe16(0x7000 | (8 + universes * sizeof(uint16_t)));
pdu.data.page = page;
- memcpy(pdu.data.data, global_cfg.fd[fd].universe + page * 512, universes);
+ memcpy(pdu.data.data, global_cfg.fd[fd].universe + page * 512, universes * sizeof(uint16_t));
if(sendto(global_cfg.fd[fd].fd, &pdu, sizeof(pdu) - (512 - universes) * sizeof(uint16_t), 0, (struct sockaddr*) &discovery_dest, sizeof(discovery_dest)) < 0){
fprintf(stderr, "Failed to output sACN universe discovery frame for interface %zu: %s\n", fd, strerror(errno));