[vlc-commits] access/satip: fix null-dereference on "malformed" protocol
Filip Roséen
git at videolan.org
Fri Mar 3 15:59:09 CET 2017
vlc | branch: master | Filip Roséen <filip at atch.se> | Thu Mar 2 19:37:36 2017 +0100| [c79cf8991ef6d129359a32003ed46e61d6e30647] | committer: Jean-Baptiste Kempf
access/satip: fix null-dereference on "malformed" protocol
The previous implementation assumd that setup_url.psz_protocol would
always be populated. These changes make sure that we fall back to
"rtsp" if the protocol is missing.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c79cf8991ef6d129359a32003ed46e61d6e30647
---
modules/access/satip.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/modules/access/satip.c b/modules/access/satip.c
index a6083c9..3840e72 100644
--- a/modules/access/satip.c
+++ b/modules/access/satip.c
@@ -690,7 +690,9 @@ static int satip_open(vlc_object_t *obj)
}
// reverse the satip protocol trick, as SAT>IP believes to be RTSP
- if( !strncasecmp( setup_url.psz_protocol, "satip", 5 ) ) {
+ if( setup_url.psz_protocol == NULL ||
+ strncasecmp( setup_url.psz_protocol, "satip", 5 ) == 0 )
+ {
setup_url.psz_protocol = (char *)"rtsp";
}
More information about the vlc-commits
mailing list