|
|
@ -201,7 +201,7 @@ typedef struct
|
|
|
|
static GslErrorType
|
|
|
|
static GslErrorType
|
|
|
|
wav_read_data_header (gint fd,
|
|
|
|
wav_read_data_header (gint fd,
|
|
|
|
DataHeader *header,
|
|
|
|
DataHeader *header,
|
|
|
|
guint byte_tqalignment)
|
|
|
|
guint byte_alignment)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
guint n_bytes;
|
|
|
|
guint n_bytes;
|
|
|
|
|
|
|
|
|
|
|
@ -241,12 +241,12 @@ wav_read_data_header (gint fd,
|
|
|
|
WAV_DEBUG ("failed to seek while skipping sub-chunk");
|
|
|
|
WAV_DEBUG ("failed to seek while skipping sub-chunk");
|
|
|
|
return GSL_ERROR_IO;
|
|
|
|
return GSL_ERROR_IO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return wav_read_data_header (fd, header, byte_tqalignment);
|
|
|
|
return wav_read_data_header (fd, header, byte_alignment);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (header->data_length < 1 || header->data_length % byte_tqalignment != 0)
|
|
|
|
if (header->data_length < 1 || header->data_length % byte_alignment != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
WAV_DEBUG ("invalid data length (%u) or tqalignment (%u)",
|
|
|
|
WAV_DEBUG ("invalid data length (%u) or alignment (%u)",
|
|
|
|
header->data_length, header->data_length % byte_tqalignment);
|
|
|
|
header->data_length, header->data_length % byte_alignment);
|
|
|
|
return GSL_ERROR_FORMAT_INVALID;
|
|
|
|
return GSL_ERROR_FORMAT_INVALID;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|