Skip to content

Commit

Permalink
Fixes CCExtractor#1084 by adding check for NULL string in ocr.c
Browse files Browse the repository at this point in the history
  • Loading branch information
thelastpolaris committed Apr 30, 2019
1 parent 17a6779 commit a1c6313
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib_ccx/ocr.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,8 @@ char* ocr_bitmap(void* arg, png_color *palette,png_byte *alpha, unsigned char* i
last_font_tag = font_tag;

}
last_font_tag_end = strstr(last_font_tag, ">") + 1;
last_font_tag_end = strstr(last_font_tag, ">");
if(last_font_tag_end) last_font_tag_end += 1; // move string to the "right" if ">" was found, otherwise leave empty string (solves #1084)

// Copy the content of the subtitle
memcpy(new_text_out_iter, line_start, line_end - line_start);
Expand Down

0 comments on commit a1c6313

Please sign in to comment.