Skip to content

Commit

Permalink
Fix incorrect initialization of addrlen in socket.accept
Browse files Browse the repository at this point in the history
  • Loading branch information
klange committed Nov 18, 2024
1 parent 1842e06 commit 3be1612
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/module_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ KRK_Method(socket,listen) {

KRK_Method(socket,accept) {
struct sockaddr_storage addr;
socklen_t addrlen;
socklen_t addrlen = sizeof(struct sockaddr_storage);

int result = accept(self->sockfd, (struct sockaddr*)&addr, &addrlen);

Expand Down

0 comments on commit 3be1612

Please sign in to comment.