Open
Description
I get this warning when compiling the common repo from GitLab(seems to be the most updated one). Is this dangerous?
/home/victorqueiroz/Personal/libshout/icecast-common/common/net/sock.c: In function ‘sock_try_connection’:
/home/victorqueiroz/Personal/libshout/icecast-common/common/net/sock.c:716:5: warning: ‘memcpy’ writing 16 bytes into a region of size 12 overflows the destination [-Wstringop-overflow=]
716 | memcpy(&server.sin_addr, &sin.sin_addr, sizeof(struct sockaddr_in));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/victorqueiroz/Personal/libshout/icecast-common/common/net/sock.c:695:29: note: at offset 4 into destination object ‘server’ of size 16
695 | struct sockaddr_in sin, server;
| ^~~~~~
I am willing to help with a PR.
Metadata
Metadata
Assignees
Labels
No labels
Activity