ref: 5bcae4d002c55bce1c6b270595a26221ac6b2d0d
parent: 2bb82e2c7a462e42d66ec78b7a50e2575f62f0a3
author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
date: Mon Nov 2 03:33:56 EST 2020
wav: fix size reading and duration
--- a/wav.c
+++ b/wav.c
@@ -7,7 +7,8 @@
{
uchar *d;
int i;
- u32int sz, csz;
+ u32int csz;
+ uvlong sz;
d = (uchar*)ctx->buf;
@@ -18,7 +19,7 @@
if(i == 0){
if(memcmp(d, "RIFF", 4) != 0 || memcmp(d+8, "WAVE", 4) != 0)
return -1;
- if((sz = beuint(d+4)) < 4)
+ if((sz = leuint(d+4)) < 4)
return -1;
sz -= 4;
continue;