[vlc-devel] commit: Fix a buffer overflow ( Rafaël Carré )

git version control git at videolan.org
Sun Mar 23 23:27:36 CET 2008


vlc | branch: master | Rafaël Carré <funman at videolan.org> | Sun Mar 23 22:27:26 2008 +0000| [05278162c64a1c402aa18dd5fccbd835e2a57aaf]

Fix a buffer overflow

Reported by Drew Yao

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=05278162c64a1c402aa18dd5fccbd835e2a57aaf
---

 modules/codec/subtitles/subsdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/codec/subtitles/subsdec.c b/modules/codec/subtitles/subsdec.c
index a810d58..0d5081d 100644
--- a/modules/codec/subtitles/subsdec.c
+++ b/modules/codec/subtitles/subsdec.c
@@ -572,7 +572,7 @@ static char *StripTags( char *psz_subtitle )
  */
 static char *CreateHtmlSubtitle( char *psz_subtitle )
 {
-    char    psz_tagStack[ 100 ];
+    char    psz_tagStack[ ( strlen( psz_subtitle ) / 3 ) + 1 ];
     size_t  i_buf_size     = strlen( psz_subtitle ) + 100;
     char   *psz_html_start = malloc( i_buf_size );
 




More information about the vlc-devel mailing list