Skip to content

Commit 32f4bb3

Browse files
andy5995icculus
authored andcommitted
NET_WaitUntilInputAvailable(): check if caller provided negative value
1 parent b1e981e commit 32f4bb3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/SDL_net.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1592,6 +1592,8 @@ int NET_WaitUntilInputAvailable(void **vsockets, int numsockets, int timeoutms)
15921592
NET_GenericSocket **sockets = (NET_GenericSocket **) vsockets;
15931593
if (!sockets) {
15941594
return SDL_InvalidParamError("sockets");
1595+
} else if (numsockets < 0) {
1596+
return SDL_InvalidParamError("numsockets");
15951597
} else if (numsockets == 0) {
15961598
return 0;
15971599
}

0 commit comments

Comments
 (0)