[IMPROVEMENT] Warn instead of Crash for Missing Final 0xFF Marker! (#1032)

* Less Harsher when Marker is missing

* Update changelog

* Skip Block by breaking

* Reference GitHub issue

* Forgot {}

* Update docs/CHANGES.TXT

Co-Authored-By: MatejMecka <matej.plavevski+github@gmail.com>
This commit is contained in:
Matej Plavevski 2018-11-02 01:07:53 +01:00 committed by Carlos Fernandez Sanz
parent 0b29fc2329
commit 1807ea9098
2 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,7 @@
0.88(2018-10-24) (unreleased)
-----------------
- Fix: Update UTF8Proc to 2.2.0
- Fix: Warn instead of fatal when a 0xFF marker is missing
0.87 (2018-10-23)
-----------------

View File

@ -500,10 +500,11 @@ void user_data_registered_itu_t_t35 (struct avc_ctx *ctx, unsigned char *userbuf
if (cc_tmp_data+local_cc_count*3 >= userend)
fatal(CCX_COMMON_EXIT_BUG_BUG,
"Syntax problem: Too many caption blocks.");
if (cc_tmp_data[local_cc_count*3]!=0xFF)
fatal(CCX_COMMON_EXIT_BUG_BUG,
"Syntax problem: Final 0xFF marker missing.");
if (cc_tmp_data[local_cc_count*3]!=0xFF){
// See GitHub Issue #1001 for the related change
mprint ("\rWarning! Syntax problem: Final 0xFF marker missing. Continuing...\n");
break; // Skip Block
}
// Save the data and process once we know the sequence number
if ( ( (ctx->cc_count + local_cc_count) * 3) + 1 > ctx->cc_databufsize)
{