Skip to content

Commit

Permalink
Fix bad address length check in pj_ioqueue_sendto(). (#3941)
Browse files Browse the repository at this point in the history
  • Loading branch information
nanangizz authored Apr 29, 2024
1 parent 4f3df90 commit f38d781
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pjlib/src/pj/ioqueue_common_abs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,7 +1056,7 @@ PJ_DEF(pj_status_t) pj_ioqueue_sendto( pj_ioqueue_key_t *key,
/*
* Check that address storage can hold the address parameter.
*/
PJ_ASSERT_RETURN(addrlen <= (int)sizeof(pj_sockaddr_in), PJ_EBUG);
PJ_ASSERT_RETURN(addrlen <= (int)sizeof(pj_sockaddr), PJ_EBUG);

/*
* Schedule asynchronous send.
Expand Down
2 changes: 1 addition & 1 deletion pjlib/src/pj/ioqueue_common_abs.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct write_operation
pj_size_t size;
pj_ssize_t written;
unsigned flags;
pj_sockaddr_in rmt_addr;
pj_sockaddr rmt_addr;
int rmt_addrlen;
};

Expand Down

0 comments on commit f38d781

Please sign in to comment.