diff options
author | cbdev <cb@cbcdn.com> | 2018-03-01 17:58:10 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2018-03-01 17:58:10 +0100 |
commit | f307934129e4f5310cbd89ec739d47b0e031951f (patch) | |
tree | 2b889345899600099fc5cda0965202b959eaa16f | |
parent | 42273a1b62d9653bbbeaff5c7646117d8b55d78a (diff) | |
download | midimonster-f307934129e4f5310cbd89ec739d47b0e031951f.tar.gz midimonster-f307934129e4f5310cbd89ec739d47b0e031951f.tar.bz2 midimonster-f307934129e4f5310cbd89ec739d47b0e031951f.zip |
Fix short memcpy
-rw-r--r-- | sacn.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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)); |