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

Fix Coverity defects #1268

Conversation

DimitriPapadopoulos
Copy link
Collaborator

No description provided.

CID 456636:  Error handling issues  (NEGATIVE_RETURNS)
"server_fd" is passed to a parameter that cannot be negative.

On error, socket() returns -1, not 0!
@adrienverge
Copy link
Owner

Thanks Dimitri 👍

@DimitriPapadopoulos DimitriPapadopoulos force-pushed the coverity_scan_defects branch 3 times, most recently from e2e527a to ed1202b Compare February 10, 2025 17:08
CID 456637:  Error handling issues  (CHECKED_RETURN)
Calling "setsockopt(new_socket, IPPROTO_TCP, 1, &flag, 4U)" without
checking return value. This library function may fail and return an
error code.
CID 456641:    (PRINTF_ARGS)
Argument "saml_port" to format specifier "%d" was expected to have
type "int" but has type "long".
warning: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
@DimitriPapadopoulos DimitriPapadopoulos merged commit 27517e0 into adrienverge:master Feb 10, 2025
5 checks passed
@DimitriPapadopoulos DimitriPapadopoulos deleted the coverity_scan_defects branch February 10, 2025 17:21
@DimitriPapadopoulos
Copy link
Collaborator Author

Not all defects have been fixed. I might look into the rest, time permitting.

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

Successfully merging this pull request may close these issues.

2 participants