Displaying 1 result from an estimated 1 matches for "read_ieee80".
2015 Feb 19
0
[PATCH] oggenc: validate count of channels in the header
...n, oe_enc_opt *opt, unsigned char *buf, int buflen)
return 0;
}
- format.channels = READ_U16_BE(buffer);
+ format.channels = channels = READ_U16_BE(buffer);
format.totalframes = READ_U32_BE(buffer+2);
format.samplesize = READ_U16_BE(buffer+6);
format.rate = (int)read_IEEE80(buffer+8);
+ if(channels <= 0L || SHRT_MAX < channels)
+ {
+ fprintf(stderr, _("Warning: Unsupported count of channels in AIFF header\n"));
+ return 0;
+ }
+
aiff->bigendian = 1;
if(aifc)
@@ -416,6 +424,7 @@ int wav_open(FILE *in, oe_enc_opt *...