[vlc-devel] commit: Fix off-by-one buffer overflow introduced in the last fix ( Rafaël Carré )
    git version control 
    git at videolan.org
       
    Tue Mar 18 19:27:43 CET 2008
    
    
  
vlc | branch: 0.8.6-bugfix | Rafaël Carré <funman at videolan.org> | Tue Mar 18 19:24:53 2008 +0100| [deae3b86eb5bd433ebbb0bc548c2b5533643ec2e]
Fix off-by-one buffer overflow introduced in the last fix
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=deae3b86eb5bd433ebbb0bc548c2b5533643ec2e
---
 modules/demux/subtitle.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/demux/subtitle.c b/modules/demux/subtitle.c
index c048d53..2bda8c0 100644
--- a/modules/demux/subtitle.c
+++ b/modules/demux/subtitle.c
@@ -685,8 +685,8 @@ static void TextPreviousLine( text_t *txt )
 /*****************************************************************************
  * Specific Subtitle function
  *****************************************************************************/
-#define MAX_LINE 8192
-#define MAX_LINE_STR "8192" /* used in *scanf() regexps */
+#define MAX_LINE 8192 /* must store the null terminator */
+#define MAX_LINE_STR "8191" /* used in *scanf() regexps */
 static int ParseMicroDvd( demux_t *p_demux, subtitle_t *p_subtitle )
 {
     demux_sys_t *p_sys = p_demux->p_sys;
    
    
More information about the vlc-devel
mailing list