1. 09 Jul, 2016 2 commits
    • Max Kellermann's avatar
      stream_decoder: check state==ABORTED after process_single() for seek · 0a49fe77
      Max Kellermann authored and Erik de Castro Lopo's avatar Erik de Castro Lopo committed
      FLAC__stream_decoder_process_single() ignores frame_sync_() errors,
      which means the caller cannot rely solely on the boolean return value,
      it is also required to check the new "state".
      After FLAC__stream_decoder_process_until_end_of_metadata(),
      state==SEARCH_FOR_FRAME_SYNC and
      last_frame.header.number_type==FRAME_NUMBER.  When an application
      seeks at this time, but an I/O error occurs, then
      FLAC__stream_decoder_process_single() returns true, but no frame has
      been read yet, i.e. last_frame.header.number_type is still
      FRAME_NUMBER.  This triggers the assertion in
       FLAC__ASSERT(decoder->private_->last_frame.header.number_type == FLAC__FRAME_NUMBER_TYPE_SAMPLE_NUMBER);
      So what needs to be done is check for state==ABORTED after the
      FLAC__stream_decoder_process_single() call.
      This bug can be triggered remotely with the Music Player Daemon
      ), and crashes the process.
      Signed-off-by: Erik de Castro Lopo's avatarErik de Castro Lopo <erikd@mega-nerd.com>
      Closes: https://github.com/xiph/flac/pull/12
    • Erik de Castro Lopo's avatar
      flac++.pc.in: Make flac a private requires · 82797787
      Erik de Castro Lopo authored
      Patch pulled from Debian package.
      Chain::Status::as_cstring uses FLAC__Metadata_ChainStatusString which
      is in libFLAC. Since the function is inline, every program calling
      this function must also link with -lflac, but this is missing in
      Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=713645
  2. 30 Jun, 2016 1 commit
  3. 28 Jun, 2016 9 commits
  4. 26 Jun, 2016 6 commits
  5. 25 Jun, 2016 1 commit
  6. 20 Jun, 2016 2 commits
  7. 13 Jun, 2016 1 commit
  8. 22 May, 2016 1 commit
    • Erik de Castro Lopo's avatar
      libFLAC: More metadata_iterators fixes · fdc1ccf2
      Erik de Castro Lopo authored
      The previous fixes for metadata_iterators didn't completely fix the problem.
      The behavior of chain_prepare_for_write_() must always be the same as the
      behavior of FLAC__metadata_chain_check_if_tempfile_needed(). Before this
      fix, one check was missing in FLAC__metadata_chain_check_if_tempfile_needed(),
      and also chain_prepare_for_write_() checked the sizes of the metadata blocks
      *after* making the changes to the chain, while
      FLAC__metadata_chain_check_if_tempfile_needed() does it *before* the changes.
      This patch changes FLAC__metadata_chain_check_if_tempfile_needed() so that it
      keeps some info (lbs_state, lbs_size) about estimated changes and then uses
      it to check the block sizes.
      It also simplifies FLAC__metadata_chain_check_if_tempfile_needed() a little.
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
  9. 12 May, 2016 3 commits
  10. 11 May, 2016 1 commit
  11. 08 May, 2016 1 commit
  12. 05 May, 2016 1 commit
    • Erik de Castro Lopo's avatar
      libFLAC: Add a workaround for a bug in MSVC2105 update2 · 94a61241
      Erik de Castro Lopo authored
      MSVC2105 update2 compiles the C code:
          abs_residual_partition_sums[partition] =
      into this:
          movq    QWORD PTR [rsi], xmm2
      while it should be:
          movd    eax, xmm2
          mov     QWORD PTR [rsi], rax
      With this patch, MSVC emits:
          movq    QWORD PTR [rsi], xmm2
          mov     DWORD PTR [rsi+4], r9d
      so the price of this workaround is 1 extra write instruction per
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
  13. 01 May, 2016 5 commits
    • Erik de Castro Lopo's avatar
      metadata_iterators.c: Limit padding size · 387992bd
      Erik de Castro Lopo authored
      Without this fix, its possible for libFLAC to create an oversized
      padding metadata block when:
      a) it merges existing padding blocks
      b) it expands padding block during metadata changes
      resulting in a corrupt FLAC file.
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
    • Erik de Castro Lopo's avatar
      Windows/MSVC: Add ENABLE_64_BIT_WORDS macro · 94ff346a
      Erik de Castro Lopo authored
      Allow setting of ENABLE_64_BIT_WORDS preprocessor variable for
      libFLAC_dynamic, libFLAC_static and test_libFLAC projects and x64
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
    • Erik de Castro Lopo's avatar
      bitwrite.c: Tweaks · f3a16f85
      Erik de Castro Lopo authored
      * Removes unused FLAC__WORD_ALL_ONES definition.
      * Add comment that unused bits of accumulator can contain garbage.
      * Turn assert inside FLAC__bitwriter_write_utf8_uint32 into runtime
        check (similar to FLAC__bitwriter_write_utf8_uint64() function).
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
    • Erik de Castro Lopo's avatar
      libFLAC: Add metadata size checks to FLAC library · 94386fde
      Erik de Castro Lopo authored
      This follows on from the previous patch.
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
    • Erik de Castro Lopo's avatar
      flac/metaflac: Limit the size of metadata blocks · 516a7ad4
      Erik de Castro Lopo authored
      Limit allow image file size to slightly less than 2^24 bytes so that
      the file size plus extra house keeping data is strictly less that
      2^24 bytes in size.
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
  14. 27 Apr, 2016 1 commit
  15. 26 Apr, 2016 1 commit
  16. 20 Mar, 2016 4 commits