Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibly dangerous warning when compiling #2

Open
VictorQueiroz opened this issue Jul 4, 2023 · 0 comments
Open

possibly dangerous warning when compiling #2

VictorQueiroz opened this issue Jul 4, 2023 · 0 comments

Comments

@VictorQueiroz
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant