1. 13 Jul, 2016 1 commit
  2. 09 Jul, 2016 2 commits
    • Max Kellermann's avatar
      stream_decoder: fix integer underflow due to malformed wasted_bits · 9949ce15
      Max Kellermann authored
      
      
      It is pretty easy for a malformed FLAC file to underflow the "bps"
      variable.  In the debug build, this results in an assertion failure in
      FLAC__bitreader_read_raw_uint32():
      
          FLAC__ASSERT(bits <= 32);
      
      In non-debug builds, this simply makes
      FLAC__bitreader_read_raw_uint32() fail because
      bitreader_read_from_client_() doesn't find enough buffer space for
      2**32-1 bits.  But since the failing FLAC_ASSERT() is reasonable, this
      should be caught in the FLAC__bitreader_read_raw_uint32() caller.
      Signed-off-by: Erik de Castro Lopo's avatarErik de Castro Lopo <erikd@mega-nerd.com>
      Closes: https://github.com/xiph/flac/pull/13
      9949ce15
    • Max Kellermann's avatar
      stream_decoder: check state==ABORTED after process_single() for seek · 0a49fe77
      Max Kellermann authored
      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
      seek_to_absolute_sample_():
      
       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
      (https://www.musicpd.org/
      
      ), 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
      0a49fe77
  3. 20 Jun, 2016 1 commit
  4. 20 Mar, 2016 4 commits
  5. 08 Feb, 2016 1 commit
  6. 24 Aug, 2015 1 commit
  7. 22 Aug, 2015 1 commit
    • Erik de Castro Lopo's avatar
      libFLAC/stream_decoder: Fix double free · 684fb3d5
      Erik de Castro Lopo authored
      The american-fuzzy-lop fuzzer found a couple of instances of double
      free() resulting from commit 15a90626.
      
      The problematic free() were the ones associated with use of the
      safe_realloc_mul_2op_() function which can call realloc(ptr,0) which
      according to the realloc manpage is already an implicit free().
      684fb3d5
  8. 09 Aug, 2015 1 commit
  9. 08 Aug, 2015 1 commit
  10. 13 Jul, 2015 1 commit
  11. 05 Jul, 2015 2 commits
    • Erik de Castro Lopo's avatar
      libFLAC: More comment validation · ff50779e
      Erik de Castro Lopo authored
      When the allocation for obj->comment fails, set obj->num_comments
      to zero.
      
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
      ff50779e
    • Erik de Castro Lopo's avatar
      libFLAC: Improve fix in bc511300 · d939b44a
      Erik de Castro Lopo authored
      The assert that was removed in bc511300, was a result of error
      handling in read_metadata_vorbiscomment_() which set obj->num_comments
      to zero, without freeing obj->comments and setting it to NULL.
      
      This commit also restores the assert that was removed.
      d939b44a
  12. 24 Apr, 2015 1 commit
  13. 18 Feb, 2015 1 commit
  14. 21 Dec, 2014 1 commit
  15. 11 Dec, 2014 2 commits
  16. 29 Nov, 2014 1 commit
  17. 27 Nov, 2014 1 commit
  18. 26 Nov, 2014 1 commit
  19. 25 Nov, 2014 2 commits
  20. 20 Nov, 2014 1 commit
  21. 26 Sep, 2014 1 commit
  22. 20 Sep, 2014 2 commits
  23. 17 Sep, 2014 1 commit
    • Erik de Castro Lopo's avatar
      Remove old/broken PPC/Altivec code. · b60f16bb
      Erik de Castro Lopo authored
      * Removes FLAC__lpc_restore_signal_asm_ppc_altivec_16*
        from lpc.h and stream_decoder.c
      * Removes PPC-specific code from cpu.c and cpu.h
      * Removes PPC stuff from libFLAC/Makefile.lite and build/*.mk
      * Removes as/gas/PPC-specific stuff from configure.ac and
        libFLAC/Makefile.am*
      * Removes libFLAC/ppc folder and remove "src/libFLAC/ppc*/Makefile"
        lines from configure.ac
      
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
      b60f16bb
  24. 27 Jul, 2014 1 commit
  25. 06 Jul, 2014 1 commit
  26. 03 Jul, 2014 1 commit
  27. 27 Jun, 2014 1 commit
  28. 14 May, 2014 1 commit
  29. 09 Apr, 2014 1 commit
    • Erik de Castro Lopo's avatar
      Fix clang compiler warnings. · 3f5208c3
      Erik de Castro Lopo authored
      These were most arising from -Wenum-conversion where an enum of
      one type was being assigned to a variable on another.
      
      Originally reported by Lenny Maiorani <lenny@colorado.edu> on the
      flac-dev mailing list.
      3f5208c3
  30. 24 Mar, 2014 1 commit
  31. 14 Mar, 2014 1 commit
  32. 24 Feb, 2014 1 commit
    • Erik de Castro Lopo's avatar
      Don't use intrinsics when they are slower. · cf0e42ae
      Erik de Castro Lopo authored
      More thorough en-/decoding tests show that sometimes the functions
      that use intrinsics are slower (or not really faster) than old
      plain C functions.
      
      After this patch the encoder doesn't use these new functions
      when their usefulness is questionable.
      
      Patch-from: lvqcl <lvqcl.mail@gmail.com>
      cf0e42ae