milis/talimatname/genel/p/pjproject-ring/fix_ioqueue_ipv6_sendto.patch

20 lines
912 B
Diff
Raw Normal View History

2017-07-25 01:27:29 +02:00
--- a/pjlib/src/pj/ioqueue_common_abs.c 2015-11-05 23:18:46.000000000 -0500
+++ b/pjlib/src/pj/ioqueue_common_abs.c 2016-10-21 13:49:09.183662433 -0400
@@ -1048,5 +1048,6 @@
* Check that address storage can hold the address parameter.
*/
- PJ_ASSERT_RETURN(addrlen <= (int)sizeof(pj_sockaddr_in), PJ_EBUG);
+ PJ_ASSERT_RETURN((((pj_sockaddr*)addr)->addr.sa_family == pj_AF_INET() && addrlen <= (int)sizeof(pj_sockaddr_in)) ||
+ (((pj_sockaddr*)addr)->addr.sa_family == pj_AF_INET6() && addrlen <= (int)sizeof(pj_sockaddr_in6)), PJ_EBUG);
/*
--- a/pjlib/src/pj/ioqueue_common_abs.h 2013-02-21 06:18:36.000000000 -0500
+++ b/pjlib/src/pj/ioqueue_common_abs.h 2016-10-21 14:04:04.148928591 -0400
@@ -64,5 +64,5 @@
pj_ssize_t written;
unsigned flags;
- pj_sockaddr_in rmt_addr;
+ pj_sockaddr rmt_addr;
int rmt_addrlen;
};