diff options
author | John Stebbins <[email protected]> | 2016-05-11 10:06:32 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-05-16 15:52:35 -0600 |
commit | 44259c4fc7154054d6869636bf3f8197e95cc48d (patch) | |
tree | 55dd239f1445d2f4959b1012ab2fff6eb853fe43 /libhb | |
parent | 4da2cf4560a1f3c6f331c55eb7c46ff5bfc8ebdf (diff) |
tx3g: fix conversion of empty SSA subtitle
an empty SSA caused a crash
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/muxcommon.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libhb/muxcommon.c b/libhb/muxcommon.c index 2fded5b25..88a5f35bb 100644 --- a/libhb/muxcommon.c +++ b/libhb/muxcommon.c @@ -861,6 +861,11 @@ void hb_muxmp4_process_subtitle_style(uint8_t *input, } in_pos = text - (char*)input; + // Always allocate enough for empty string + if (!check_realloc_output(&output, 1)) + { + goto fail; + } while (input[in_pos] != '\0') { text = hb_ssa_to_text((char*)input + in_pos, &consumed, &style); |