shithub: dumb

Download patch

ref: f5539068a087f734f795c6dc25d88372590b3806
parent: 6be02dc3eb093c6f5ce8cce0c131a3fbef7b062c
author: Christopher Snowhill <kode54@gmail.com>
date: Tue Sep 12 10:04:41 EDT 2017

Don't read past end of components array.

--- a/src/it/itread.c
+++ b/src/it/itread.c
@@ -1242,7 +1242,7 @@
 		switch (component[n].type) {
 
 			case IT_COMPONENT_SONG_MESSAGE:
-				if ( n < n_components ) {
+				if ( n+1 < n_components ) {
 					message_length = min( message_length, (int)(component[n+1].offset - component[n].offset) );
 				}
 				sigdata->song_message = malloc(message_length + 1);