summaryrefslogtreecommitdiffstats
path: root/libass
diff options
context:
space:
mode:
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-07 21:06:50 +0000
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-01-07 21:06:50 +0000
commit169e65afd97293bd38a8292a46efd6565fc4ddf0 (patch)
tree79dcd6b46c396be609c80c164e9978f1bc43a29e /libass
parent1f007a0a798ba6403edaeb0a634673530f5d9a31 (diff)
downloadmpv-169e65afd97293bd38a8292a46efd6565fc4ddf0.tar.bz2
mpv-169e65afd97293bd38a8292a46efd6565fc4ddf0.tar.xz
No need to reinvent strdup...
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25644 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libass')
-rw-r--r--libass/ass_library.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libass/ass_library.c b/libass/ass_library.c
index 9c41c1d3fb..4c4e89fe77 100644
--- a/libass/ass_library.c
+++ b/libass/ass_library.c
@@ -90,8 +90,7 @@ void ass_add_font(ass_library_t* priv, char* name, char* data, int size)
return;
grow_array((void**)&priv->fontdata, priv->num_fontdata, sizeof(*priv->fontdata));
- priv->fontdata[idx].name = malloc(strlen(name));
- strcpy(priv->fontdata[idx].name, name);
+ priv->fontdata[idx].name = strdup(name);
priv->fontdata[idx].data = malloc(size);
memcpy(priv->fontdata[idx].data, data, size);