Skip to content

setsockopt return value is not checked #4799

Open
@WesleyRosenblum

Description

@WesleyRosenblum

Problem:

The return value of setsockopt is not checked in several places in s2n_socket.c, for example: https://github.com/aws/s2n-tls/blob/main/utils/s2n_socket.c#L123

Some of the uses of setsockopt have the comment /* Ignore the return value, if it fails it fails */, but others do not, so its not clear if it was intentional.

Solution:

Either check the return value, or add a comment

  • Does this change what S2N sends over the wire? No
  • Does this change any public APIs? No

Requirements / Acceptance Criteria:

Uses of setsockopt either check the return value or have a comment explaining why it is not checked

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions