]> granicus.if.org Git - libass/commitdiff
fontselect: initialize postscript name
authorGrigori Goronzy <greg@chown.ath.cx>
Mon, 7 Sep 2015 10:13:33 +0000 (12:13 +0200)
committerGrigori Goronzy <greg@chown.ath.cx>
Mon, 7 Sep 2015 10:13:33 +0000 (12:13 +0200)
Bad things can happen otherwise. Found by coverity scan.

libass/ass_font.c

index b3c639dc8b0df0dd86bbbecbeae5bbbd5e06d938..5b0131f471b23803f878da193f55cc66d73f020f 100644 (file)
@@ -135,7 +135,7 @@ close_stream_font(FT_Stream stream)
 static int add_face(ASS_FontSelector *fontsel, ASS_Font *font, uint32_t ch)
 {
     char *path;
-    char *postscript_name;
+    char *postscript_name = NULL;
     int i, index, uid, error;
     ASS_FontStream stream = { NULL, NULL };
     FT_Face face;