summaryrefslogtreecommitdiffstats
path: root/libhb/stream.c
diff options
context:
space:
mode:
authorRodeo <[email protected]>2012-01-24 22:22:13 +0000
committerRodeo <[email protected]>2012-01-24 22:22:13 +0000
commit10e0298b16908071dd8e34b1c773d5dc96051e73 (patch)
treee4c9f73f988c5a22db317018afa412267d18b8d6 /libhb/stream.c
parentb0c88b1f459ffbb9baeb13b88f97293d170fcc74 (diff)
Fix crash in add_ffmpeg_attachment: the value for "filename" metadata may be NULL, so we can't call strlen without checking.
Should fix https://forum.handbrake.fr/viewtopic.php?f=11&t=23018 and https://forum.handbrake.fr/viewtopic.php?f=12&t=23101 git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4420 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'libhb/stream.c')
-rw-r--r--libhb/stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libhb/stream.c b/libhb/stream.c
index 69ba920f7..1d7652136 100644
--- a/libhb/stream.c
+++ b/libhb/stream.c
@@ -5170,7 +5170,7 @@ static void add_ffmpeg_attachment( hb_title_t *title, hb_stream_t *stream, int i
break;
default:
{
- int len = strlen( name );
+ int len = name ? strlen( name ) : 0;
if( len >= 4 &&
( !strcmp( name + len - 4, ".ttc" ) ||
!strcmp( name + len - 4, ".TTC" ) ||