From 8ad664ab21b6833fdde41d152ec48a630d679918 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Mon, 29 Apr 2024 12:34:28 +0700 Subject: [PATCH] Fix bad address length check in pj_ioqueue_sendto(). --- pjlib/src/pj/ioqueue_common_abs.c | 2 +- pjlib/src/pj/ioqueue_common_abs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pjlib/src/pj/ioqueue_common_abs.c b/pjlib/src/pj/ioqueue_common_abs.c index f5ad390388..a9a6a9cfd0 100644 --- a/pjlib/src/pj/ioqueue_common_abs.c +++ b/pjlib/src/pj/ioqueue_common_abs.c @@ -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. diff --git a/pjlib/src/pj/ioqueue_common_abs.h b/pjlib/src/pj/ioqueue_common_abs.h index 77787b15c6..bcc11df45e 100644 --- a/pjlib/src/pj/ioqueue_common_abs.h +++ b/pjlib/src/pj/ioqueue_common_abs.h @@ -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; };