summaryrefslogtreecommitdiffstats
path: root/libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch')
-rw-r--r--libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch b/libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch
new file mode 100644
index 0000000000..2f21bf370e
--- /dev/null
+++ b/libraries/libdvdcss/patches/0003-Check-for-empty-strings.patch
@@ -0,0 +1,34 @@
+From 100ac1a3762915042ee65b1bf370399966f61be5 Mon Sep 17 00:00:00 2001
+From: Petri Hintukainen <phintuka@gmail.com>
+Date: Fri, 11 Mar 2016 12:07:03 +0200
+Subject: [PATCH 3/5] Check for empty strings
+
+---
+ src/libdvdcss.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/libdvdcss.c b/src/libdvdcss.c
+index 408ec2f..ac90030 100644
+--- a/src/libdvdcss.c
++++ b/src/libdvdcss.c
+@@ -234,7 +234,7 @@ static int set_cache_directory( dvdcss_t dvdcss )
+
+ /* Try looking in password file for home dir. */
+ p_pwd = getpwuid(getuid());
+- if( p_pwd )
++ if( p_pwd && p_pwd[ 0 ] )
+ {
+ psz_home = p_pwd->pw_dir;
+ }
+@@ -248,7 +248,7 @@ static int set_cache_directory( dvdcss_t dvdcss )
+ }
+
+ /* Cache our keys in ${HOME}/.dvdcss/ */
+- if( psz_home )
++ if( psz_home && psz_home[ 0 ] )
+ {
+ int home_pos = 0;
+
+--
+2.10.0
+