[libdvdcss-devel] Avoid closing random file descriptor

Petri Hintukainen git at videolan.org
Wed Apr 29 15:23:40 CEST 2015


libdvdcss | branch: master | Petri Hintukainen <phintuka at gmail.com> | Sun Mar 29 22:21:52 2015 +0300| [70260b04bf37880bb928306f6f7ee607ce531395] | committer: Jean-Baptiste Kempf

Avoid closing random file descriptor

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/libdvdcss.git/?a=commit;h=70260b04bf37880bb928306f6f7ee607ce531395
---

 src/libdvdcss.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/libdvdcss.c b/src/libdvdcss.c
index f2d9a22..dc840ad 100644
--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -493,6 +493,7 @@ static dvdcss_t dvdcss_open_common ( const char *psz_target, void *p_stream,
         return NULL;
 
     /* Initialize structure with default values. */
+    dvdcss->i_fd = -1;
     dvdcss->i_pos = 0;
     dvdcss->p_titles = NULL;
     dvdcss->psz_device = psz_target ? strdup( psz_target ) : NULL;



More information about the libdvdcss-devel mailing list