Skip to content
Permalink
Browse files

Fixes #1084 by adding check for NULL string in ocr.c (#1085)

  • Loading branch information...
thelastpolaris authored and cfsmp3 committed May 1, 2019
1 parent 17a6779 commit d3543ff1a2c914d7e111f04158b15620c68604be
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/lib_ccx/ocr.c
@@ -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);

0 comments on commit d3543ff

Please sign in to comment.
You can’t perform that action at this time.