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

bug in call to recvfrom #3

Open
benwar99 opened this issue Jan 18, 2024 · 0 comments
Open

bug in call to recvfrom #3

benwar99 opened this issue Jan 18, 2024 · 0 comments

Comments

@benwar99
Copy link

   n = recvfrom(sockfd, recv_buffer,
                         (sizeof recv_buffer) * sizeof recv_buffer[0],
                         0 /* flags */,
                         (struct sockaddr *)&respaddr, &respaddrsize);

length of buffer is (sizeof recv_buffer) only with * sizeof recv_buffer[0] is passed length to large.
https://github.com/Netnod/vadarklockan/blob/f47d1f486e7af8b018e89cb36589168910856f9e/examples/c/vak_client_single.c#L151C26-L151C26

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