Skip to content

Conversation

@Nopey
Copy link

@Nopey Nopey commented Nov 28, 2024

Winsock's SOCKET typedef is as wide as a pointer (it's a typedef of UINT_PTR), but libnatpmp implicitly casts it to an int (as other platform's sockets are ints.)

This is a soundness issue, as despite winsock usually returning small values like 0x00000000000000C8, we have no guarantee that a winsock SOCKET can be safely truncated to an int.

This is a soundness issue, as despite winsock usually returning
small values like 0x00000000000000C8, we have no guarantee that a
winsock SOCKET can be safely truncated to an int.
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.

1 participant