]> granicus.if.org Git - libass/commitdiff
Bugfix: when copying ass_force_style_list, ending 0 was left out.
authoreugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 6 Nov 2006 20:09:28 +0000 (20:09 +0000)
committereugeni <eugeni@b3059339-0415-0410-9bf9-f77b7e298cf2>
Mon, 6 Nov 2006 20:09:28 +0000 (20:09 +0000)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20738 b3059339-0415-0410-9bf9-f77b7e298cf2

libass/ass_library.c

index f728aefbeefd8181b92f8b66907f8ca8bf01fbb1..1928e4361c0e21ce134098f847d04ed8f14d749e 100644 (file)
@@ -66,7 +66,8 @@ void ass_set_style_overrides(ass_library_t* priv, char** list)
 
        for (p = list, cnt = 0; *p; ++p, ++cnt) {}
 
-       priv->style_overrides = malloc(cnt * sizeof(char*));
+       priv->style_overrides = malloc((cnt + 1) * sizeof(char*));
        for (p = list, q = priv->style_overrides; *p; ++p, ++q)
                *q = strdup(*p);
+       priv->style_overrides[cnt] = NULL;
 }