[vlc-devel] [PATCH] srt: fix bug in setting passphrase

Aaron Boxer boxerab at gmail.com
Wed Apr 3 19:15:29 CEST 2019


---
 modules/access/srt.c        | 2 +-
 modules/access_output/srt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access/srt.c b/modules/access/srt.c
index 2cf800a914..ad98e2db8e 100644
--- a/modules/access/srt.c
+++ b/modules/access/srt.c
@@ -174,7 +174,7 @@ static bool srt_schedule_reconnect(stream_t *p_stream)
                 SRTO_PBKEYLEN, &i_key_length, sizeof(i_key_length) );

         srt_set_socket_option( strm_obj, SRT_PARAM_PASSPHRASE, p_sys->sock,
-                SRTO_PASSPHRASE, &psz_passphrase, sizeof(psz_passphrase) );
+                SRTO_PASSPHRASE, &psz_passphrase, strlen(psz_passphrase) );
     }

     /* set maximum payload size */
diff --git a/modules/access_output/srt.c b/modules/access_output/srt.c
index d772a48843..31752ee6e7 100644
--- a/modules/access_output/srt.c
+++ b/modules/access_output/srt.c
@@ -165,7 +165,7 @@ static bool srt_schedule_reconnect(sout_access_out_t
*p_access)
                 SRTO_PBKEYLEN, &i_key_length, sizeof(i_key_length) );

         srt_set_socket_option( access_obj, SRT_PARAM_PASSPHRASE,
p_sys->sock,
-                SRTO_PASSPHRASE, &psz_passphrase, sizeof(psz_passphrase) );
+                SRTO_PASSPHRASE, &psz_passphrase, strlen(psz_passphrase) );
     }

     /* set maximumu payload size */
-- 
2.17.1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190403/8bf68abc/attachment.html>


More information about the vlc-devel mailing list