Moved line 31 to line 27, i.e.: move the "*nbytes = sizeof(int);" before the 'if' statement.
The  code to read the header of a sigproc filterbank had a small bug that can lead to a wrong calculation of the number of bytes of the header and, consequently, also of the samples of the payload. This occurs when the filterbank file has a field in the header with errors or weird values.