Displaying 6 results from an estimated 6 matches for "do_full_decode".
2014 Dec 11
2
Two new CVEs against FLAC
Erik de Castro Lopo wrote:
> I think I have an alternative fix for the CVE which should not break
> seeking. I'm working on getting an copy of the file with which to test.
Patch applied and pushed.
commit b4b2910bdca010808ccf2799f55562fa91f4347b
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date: Wed Dec 10 18:54:16 2014 +1100
2014 Jun 19
0
[PATCH] stream_encoder : Improve selection of residual accumulator width
...a/src/libFLAC/stream_decoder.c
+++ b/src/libFLAC/stream_decoder.c
@@ -99,7 +99,7 @@ static FLAC__bool read_subframe_constant_(FLAC__StreamDecoder *decoder, unsigned
static FLAC__bool read_subframe_fixed_(FLAC__StreamDecoder *decoder, unsigned channel, unsigned bps, const unsigned order, FLAC__bool do_full_decode);
static FLAC__bool read_subframe_lpc_(FLAC__StreamDecoder *decoder, unsigned channel, unsigned bps, const unsigned order, FLAC__bool do_full_decode);
static FLAC__bool read_subframe_verbatim_(FLAC__StreamDecoder *decoder, unsigned channel, unsigned bps, FLAC__bool do_full_decode);
-static FLAC__...
2014 Dec 11
0
Two new CVEs against FLAC
...-2609,6 +2609,9 @@ FLAC__bool read_subframe_fixed_(FLAC__StreamDecoder *decoder, unsigned channel,
FLAC__ASSERT(0);
}
+ if (decoder->private_->frame.header.blocksize < order)
+ return true;
+
/* decode the subframe */
if(do_full_decode) {
memcpy(decoder->private_->output[channel], subframe->warmup, sizeof(FLAC__int32) * order);
@@ -2688,6 +2691,9 @@ FLAC__bool read_subframe_lpc_(FLAC__StreamDecoder *decoder, unsigned channel, un
FLAC__ASSERT(0);
}
+ if (decoder->...
2014 Jun 19
5
[PATCH] stream_encoder : Improve selection of residual accumulator width
On Thu, Jun 19, 2014 at 03:30:22PM +0400, lvqcl wrote:
> BTW, what can you say about the following place in stream_decoder.c
> in read_subframe_lpc_() function:
>
> /*@@@@@@ technically not pessimistic enough, should be more like
> if( (FLAC__uint64)order * ((((FLAC__uint64)1)<<bps)-1) * ((1<<subframe->qlp_coeff_precision)-1) < (((FLAC__uint64)-1)
2005 Feb 02
0
two small-ish optimizations (death by a thousand cuts)
...> 1;
+ }
+ break;
+ default:
+ FLAC__ASSERT(0);
+ break;
+ }
+}
+
FLAC__bool allocate_output_(FLAC__StreamDecoder *decoder, unsigned size, unsigned channels)
{
unsigned i;
@@ -1380,8 +1418,6 @@
FLAC__bool read_frame_(FLAC__StreamDecoder *decoder, FLAC__bool *got_a_frame, FLAC__bool do_full_decode)
{
unsigned channel;
- unsigned i;
- FLAC__int32 mid, side, left, right;
FLAC__uint16 frame_crc; /* the one we calculate from the input stream */
FLAC__uint32 x;
@@ -1446,41 +1482,9 @@
if(!FLAC__bitbuffer_read_raw_uint32(decoder->private_->input, &x, FLAC__FRAME_FOOTER_CRC_LEN,...
2014 Dec 11
4
Two new CVEs against FLAC
...t pop up
in the stream of which the CRC checks out, the whole frame is
decoded to validate that a frame is correct. The bogus header
might trigger the sanity checks that were made to fail by the
CVEs, thereby the seek fails.
A fix for this might be not decoding a frame fully, (by making
the /*do_full_decode=*/true in
FLAC__stream_decoder_process_single conditionally dependent on
decoder->private_->is_seeking) but instead implement more sanity
checks. For example, it could be checked whether the sample
rate, blocksize, number of channels and sample size in the frame
header match with those i...