[vlc-commits] DSM: fix potential NULL dereference
Jean-Baptiste Kempf
git at videolan.org
Fri Jun 24 16:15:08 CEST 2016
vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jun 24 16:14:19 2016 +0200| [f11eaa4c4106ada6eeed1be3b3fee40282dfdb2c] | committer: Jean-Baptiste Kempf
DSM: fix potential NULL dereference
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f11eaa4c4106ada6eeed1be3b3fee40282dfdb2c
---
modules/access/dsm/access.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/access/dsm/access.c b/modules/access/dsm/access.c
index 182a774..0855675 100644
--- a/modules/access/dsm/access.c
+++ b/modules/access/dsm/access.c
@@ -221,7 +221,8 @@ static int get_address( access_t *p_access )
{
access_sys_t *p_sys = p_access->p_sys;
- if( !inet_pton( AF_INET, p_sys->url.psz_host, &p_sys->addr ) )
+ if( p_sys->url.psz_host != NULL &&
+ !inet_pton( AF_INET, p_sys->url.psz_host, &p_sys->addr ) )
{
/* This is not an ip address, let's try netbios/dns resolve */
struct addrinfo *p_info = NULL;
More information about the vlc-commits
mailing list