ref: 76ead85f548fc9ab04959dd316c6631d9b16b31f
parent: b8e4e314cfa8d21657e58b46f3b7a81ecbca5d9f
author: Christopher Snowhill <kode54@gmail.com>
date: Tue Sep 12 12:50:13 EDT 2017
Extra error checking, just in case.
--- a/src/it/itread.c
+++ b/src/it/itread.c
@@ -1048,7 +1048,10 @@
sigdata->pattern[n].entry = NULL;
}
- dumbfile_getnc((char *)sigdata->order, sigdata->n_orders, f);
+ if ( dumbfile_getnc((char *)sigdata->order, sigdata->n_orders, f) < sigdata->n_orders ) {
+ _dumb_it_unload_sigdata(sigdata);
+ return NULL;
+ }
sigdata->restart_position = 0;
min_components = (special & 1) + sigdata->n_instruments + sigdata->n_samples + sigdata->n_patterns;