ref: b7c49e62cc65298a6456cddce83988b4a6776888
parent: d65a75cd4be610f85ee55ef5ac4a21fae693305a
author: Christopher Snowhill <kode54@gmail.com>
date: Tue Sep 12 12:44:45 EDT 2017
Handle read errors.
--- a/src/it/readamf.c
+++ b/src/it/readamf.c
@@ -260,6 +260,9 @@
if ( sample->length )
read_length = (int)dumbfile_getnc( sample->data, sample->length, f );
+
+ if ( read_length < 0 )
+ read_length = 0;
for ( i = 0; i < read_length; i++ ) {
( ( signed char * ) sample->data )[ i ] ^= 0x80;