shithub: libdvdcss

Download patch

ref: a0f00ca3209ce13e38872f43010badbb6e568f83
parent: a898069bcd19498a0fea789943c423a2d0f61dc0
author: Sam Hocevar <sam@videolan.org>
date: Wed May 13 16:54:35 EDT 2009

Fix a potential format string crash.

--- a/src/libdvdcss.c
+++ b/src/libdvdcss.c
@@ -420,7 +420,6 @@
     if( psz_cache )
     {
         uint8_t p_sector[DVDCSS_BLOCK_SIZE];
-        char psz_debug[PATH_MAX + 30];
         char psz_key[1 + KEY_SIZE * 2 + 1];
         char *psz_title;
         uint8_t *psz_serial;
@@ -548,9 +547,8 @@
         /* Pointer to the filename we will use. */
         dvdcss->psz_block = dvdcss->psz_cachefile + i;
 
-        sprintf( psz_debug, "using CSS key cache dir: %s",
-                            dvdcss->psz_cachefile );
-        print_debug( dvdcss, psz_debug );
+        print_debug( dvdcss, "using CSS key cache dir: %s",
+                             dvdcss->psz_cachefile );
     }
     nocache: