ref: 664e96cdec87684b631ad6ad92c92664caa9a2c7
parent: 9cbf6341a0773f856eb669cb9daa441d20aea366
author: knik <knik>
date: Sat Jul 1 05:32:35 EDT 2017
hopefully fixed prevoius patch, damn.
--- a/frontend/input.c
+++ b/frontend/input.c
@@ -16,7 +16,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * $Id: input.c,v 1.18 2017/07/01 08:58:58 knik Exp $
+ * $Id: input.c,v 1.19 2017/07/01 09:32:35 knik Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -182,11 +182,11 @@
memset(&wave, 0, sizeof(wave));
fmtsize = (riffsub.len < sizeof(wave)) ? riffsub.len : sizeof(wave);
- // check if format is at least WAVEFORMATEX long
- if (fmtsize < sizeof(struct WAVEFORMATEX))
+ // check if format is at least 16 bytes long
+ if (fmtsize < 16)
return NULL;
- if (fread(&wave, 1, fmtsize, wave_f) != fmtsize)
+ if (fread(&wave, 1, fmtsize, wave_f) != fmtsize)
return NULL;
fseek(wave_f, riffsub.len - fmtsize, SEEK_CUR);