[vlc-commits] amt: fix recv buf arguments

Thomas Guillem git at videolan.org
Wed Oct 2 11:05:24 CEST 2019


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Oct  2 11:04:15 2019 +0200| [542b55d6f4ee520401053dc014769e78c9b03175] | committer: Thomas Guillem

amt: fix recv buf arguments

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=542b55d6f4ee520401053dc014769e78c9b03175
---

 modules/access/amt.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/access/amt.c b/modules/access/amt.c
index 190a9d4674..347cfe80f0 100644
--- a/modules/access/amt.c
+++ b/modules/access/amt.c
@@ -649,7 +649,7 @@ static block_t *BlockAMT(stream_t *p_access, bool *restrict eof)
     {
         struct sockaddr temp;
         socklen_t temp_size = sizeof( struct sockaddr );
-        len = recvfrom( sys->sAMT, &pkt, sys->mtu + tunnel, 0, (struct sockaddr*)&temp, &temp_size );
+        len = recvfrom( sys->sAMT, (char *)pkt->p_buffer, sys->mtu + tunnel, 0, (struct sockaddr*)&temp, &temp_size );
     }
 
     /* If the payload length is greater than the MTU then the overflow buffer was utilized */
@@ -1168,7 +1168,7 @@ static bool amt_rcv_relay_adv( stream_t *p_access )
 
     struct sockaddr temp;
     socklen_t temp_size = sizeof( struct sockaddr );
-    ssize_t len = recvfrom( sys->sAMT, &pkt, RELAY_ADV_MSG_LEN, 0, &temp, &temp_size );
+    ssize_t len = recvfrom( sys->sAMT, pkt, RELAY_ADV_MSG_LEN, 0, &temp, &temp_size );
 
     if (len < 0)
     {
@@ -1261,7 +1261,7 @@ static bool amt_rcv_relay_mem_query( stream_t *p_access )
             return false;
     }
 
-    ssize_t len = recv( sys->sAMT, &pkt, RELAY_QUERY_MSG_LEN, 0 );
+    ssize_t len = recv( sys->sAMT, pkt, RELAY_QUERY_MSG_LEN, 0 );
 
     if (len < 0 || len != RELAY_QUERY_MSG_LEN)
     {



More information about the vlc-commits mailing list