[vlc-devel] [PATCH 14/19] ttml codec: add memory allocation error
Stanislas Plessia
stplessia at gmail.com
Mon Aug 29 16:01:12 CEST 2016
---
modules/codec/substtml.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/modules/codec/substtml.c b/modules/codec/substtml.c
index 196447c..f53c897 100644
--- a/modules/codec/substtml.c
+++ b/modules/codec/substtml.c
@@ -266,6 +266,11 @@ static ttml_style_t* ParseTTMLStyle( decoder_t *p_dec, xml_reader_t* p_reader, c
{
free( p_ttml_style->font_style->psz_fontname );
p_ttml_style->font_style->psz_fontname = strdup( val );
+ if( unlikely( p_ttml_style->font_style->psz_fontname == NULL ) )
+ {
+ CleanupStyle( p_ttml_style );
+ return NULL;
+ }
}
else if( !strcasecmp( "tts:opacity", attr ) )
{
--
2.7.4
More information about the vlc-devel
mailing list