[vlc-commits] codec: subsusf: fix NULL dereference
Francois Cartegnie
git at videolan.org
Tue Aug 11 02:35:42 CEST 2015
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Aug 11 00:29:54 2015 +0200| [8d860e29419b716f76c665e85d980d6f53754803] | committer: Francois Cartegnie
codec: subsusf: fix NULL dereference
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8d860e29419b716f76c665e85d980d6f53754803
---
modules/codec/subsusf.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/codec/subsusf.c b/modules/codec/subsusf.c
index be9f2be..2cf1073 100644
--- a/modules/codec/subsusf.c
+++ b/modules/codec/subsusf.c
@@ -904,7 +904,10 @@ static subpicture_region_t *ParseUSFString( decoder_t *p_dec,
{
subpicture_region_t *p_text_region;
- psz_end += strcspn( psz_end, ">" ) + 1;
+ if( psz_end )
+ psz_end += strcspn( psz_end, ">" ) + 1;
+ else
+ psz_end = psz_subtitle + strlen( psz_subtitle );
p_text_region = CreateTextRegion( p_dec,
psz_subtitle,
More information about the vlc-commits
mailing list