[vlc-commits] subsdec: use vlc_alloc helper
Thomas Guillem
git at videolan.org
Sat Nov 11 19:00:01 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sat Nov 11 18:43:30 2017 +0100| [1846fcbd6c5ba85a02ab6b6fdae3de201e816d25] | committer: Thomas Guillem
subsdec: use vlc_alloc helper
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1846fcbd6c5ba85a02ab6b6fdae3de201e816d25
---
modules/codec/subsdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/codec/subsdec.c b/modules/codec/subsdec.c
index 592a10a74a..c8b82c034e 100644
--- a/modules/codec/subsdec.c
+++ b/modules/codec/subsdec.c
@@ -586,7 +586,7 @@ static char* GetTag( const char** ppsz_subtitle, bool b_closing )
size_t tag_size = 1;
while ( isalnum( psz_subtitle[tag_size] ) || psz_subtitle[tag_size] == '_' )
tag_size++;
- char* psz_tagname = malloc( ( tag_size + 1 ) * sizeof( *psz_tagname ) );
+ char* psz_tagname = vlc_alloc( tag_size + 1, sizeof( *psz_tagname ) );
if ( unlikely( !psz_tagname ) )
return NULL;
strncpy( psz_tagname, psz_subtitle, tag_size );
More information about the vlc-commits
mailing list