For reference in the Debian BTS: ==15547== Memcheck, a memory error detector ==15547== Copyright (C) 2002-2015, and GNU GPL'd, by Julian Seward et al. ==15547== Using Valgrind-3.12.0 and LibVEX; rerun with -h for copyright info ==15547== Command: sndfile-resample -to 24000 -c 1 /root/poc/00260-libsndfile-invalidread-flac_buffer_copy out ==15547== ==15547== Conditional jump or move depends on uninitialised value(s) ==15547== at 0x51AF38D: psf_open_file (sndfile.c:2741) ==15547== by 0x108EE1: ??? (in /usr/bin/sndfile-resample) ==15547== by 0x57402B0: (below main) (libc-start.c:291) ==15547== ==15547== Invalid read of size 4 ==15547== at 0x51B87BB: flac_buffer_copy (flac.c:284) ==15547== by 0x51B9724: flac_read_loop (flac.c:916) ==15547== by 0x51B9824: flac_read_flac2f (flac.c:982) ==15547== by 0x51ADA89: sf_readf_float (sndfile.c:1870) ==15547== by 0x10925F: ??? (in /usr/bin/sndfile-resample) ==15547== by 0x57402B0: (below main) (libc-start.c:291) ==15547== Address 0x66ac370 is 0 bytes after a block of size 16,400 alloc'd ==15547== at 0x4C2BBAF: malloc (vg_replace_malloc.c:299) ==15547== by 0x5B0AFA8: ??? (in /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0) ==15547== by 0x5B0F69C: FLAC__stream_decoder_process_single (in /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0) ==15547== by 0x5B104AB: FLAC__stream_decoder_seek_absolute (in /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0) ==15547== by 0x51B7C50: flac_seek (flac.c:1374) ==15547== by 0x51ABB60: sf_seek (sndfile.c:1468) ==15547== by 0x1090BB: ??? (in /usr/bin/sndfile-resample) ==15547== by 0x57402B0: (below main) (libc-start.c:291) ==15547== ==15547== ==15547== Process terminating with default action of signal 11 (SIGSEGV) ==15547== Access not within mapped region at address 0x4000 ==15547== at 0x51B87BB: flac_buffer_copy (flac.c:284) ==15547== by 0x51B9724: flac_read_loop (flac.c:916) ==15547== by 0x51B9824: flac_read_flac2f (flac.c:982) ==15547== by 0x51ADA89: sf_readf_float (sndfile.c:1870) ==15547== by 0x10925F: ??? (in /usr/bin/sndfile-resample) ==15547== by 0x57402B0: (below main) (libc-start.c:291) ==15547== If you believe this happened as a result of a stack ==15547== overflow in your program's main thread (unlikely but ==15547== possible), you can try to increase the size of the ==15547== main thread stack using the --main-stacksize= flag. ==15547== The main thread stack size used in this run was 8388608. Input File : /root/poc/00260-libsndfile-invalidread-flac_buffer_copy Sample Rate : 1047740 Input Frames : 47261415625
SRC Ratio : 0.022906 Converter : Medium Sinc Interpolator Output file : out Sample Rate : 24000 ==15547== ==15547== HEAP SUMMARY: ==15547== in use at exit: 4,030,315 bytes in 59 blocks ==15547== total heap usage: 60 allocs, 1 frees, 4,034,411 bytes allocated ==15547== ==15547== LEAK SUMMARY: ==15547== definitely lost: 1,048,560 bytes in 4 blocks ==15547== indirectly lost: 0 bytes in 0 blocks ==15547== possibly lost: 32,800 bytes in 2 blocks ==15547== still reachable: 2,948,955 bytes in 53 blocks ==15547== suppressed: 0 bytes in 0 blocks ==15547== Rerun with --leak-check=full to see details of leaked memory ==15547== ==15547== For counts of detected and suppressed errors, rerun with: -v ==15547== Use --track-origins=yes to see where uninitialised values come from ==15547== ERROR SUMMARY: 4 errors from 2 contexts (suppressed: 0 from 0) with 1.0.27-2. Regards, Salvatore

