Bug#920490: bs1770gain: Abort with "free(): invalid next size (normal)" on mp4
Package: bs1770gain
Version: 0.5.2-2
Severity: important
X-Debbugs-CC: Peter Belkner <pbelkner@snafu.de>
The program aborts on a problematic file I ran into, and valgrind show
it is writing past the end of an allocated array in sox_flow_effects().
I can try to run with debugging enabled if needed.
% bs1770gain 532116/original/orig_d89dd8f3f6aa4e20a1cf28c0e6f5dcb3.mp4
analyzing ...
[1/1] "orig_d89dd8f3f6aa4e20a1cf28c0e6f5dcb3.mp4": 95free(): invalid next size (normal)
Aborted
% valgrind bs1770gain 532116/original/orig_d89dd8f3f6aa4e20a1cf28c0e6f5dcb3.mp4
==24975== Memcheck, a memory error detector
==24975== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==24975== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==24975== Command: bs1770gain 532116/original/orig_d89dd8f3f6aa4e20a1cf28c0e6f5dcb3.mp4
==24975==
analyzing ...
[1/1] "orig_d89dd8f3f6aa4e20a1cf28c0e6f5dcb3.mp4": ==24975== Invalid write of size 4
==24975== at 0x114FA1: ??? (in /usr/bin/bs1770gain)
==24975== by 0x1134DC: ??? (in /usr/bin/bs1770gain)
==24975== by 0x111DFF: ??? (in /usr/bin/bs1770gain)
==24975== by 0x11392D: ??? (in /usr/bin/bs1770gain)
==24975== by 0x113A1D: ??? (in /usr/bin/bs1770gain)
==24975== by 0x6251932: sox_flow_effects (in /usr/lib/x86_64-linux-gnu/libsox.so.3.0.0)
==24975== by 0x110777: ??? (in /usr/bin/bs1770gain)
==24975== by 0x10E7C8: ??? (in /usr/bin/bs1770gain)
==24975== by 0x10C3F2: ??? (in /usr/bin/bs1770gain)
==24975== by 0x64DB09A: (below main) (libc-start.c:308)
==24975== Address 0x10bcb090 is 0 bytes after a block of size 32,768 alloc'd
==24975== at 0x48356AF: malloc (vg_replace_malloc.c:298)
==24975== by 0x4837DE7: realloc (vg_replace_malloc.c:826)
==24975== by 0x6244CE2: lsx_realloc (in /usr/lib/x86_64-linux-gnu/libsox.so.3.0.0)
==24975== by 0x6250FED: sox_flow_effects (in /usr/lib/x86_64-linux-gnu/libsox.so.3.0.0)
==24975== by 0x110777: ??? (in /usr/bin/bs1770gain)
==24975== by 0x10E7C8: ??? (in /usr/bin/bs1770gain)
==24975== by 0x10C3F2: ??? (in /usr/bin/bs1770gain)
==24975== by 0x64DB09A: (below main) (libc-start.c:308)
==24975==
integrated: -18.35 LUFS / -4.65 LU
[ALBUM]:
integrated: -18.35 LUFS / -4.65 LU
done.
==24975==
==24975== HEAP SUMMARY:
==24975== in use at exit: 47,380 bytes in 250 blocks
==24975== total heap usage: 17,382 allocs, 17,132 frees, 21,368,601 bytes allocated
==24975==
==24975== LEAK SUMMARY:
==24975== definitely lost: 0 bytes in 0 blocks
==24975== indirectly lost: 0 bytes in 0 blocks
==24975== possibly lost: 1,352 bytes in 18 blocks
==24975== still reachable: 46,028 bytes in 232 blocks
==24975== of which reachable via heuristic:
==24975== newarray : 1,536 bytes in 16 blocks
==24975== suppressed: 0 bytes in 0 blocks
==24975== Rerun with --leak-check=full to see details of leaked memory
==24975==
==24975== For counts of detected and suppressed errors, rerun with: -v
==24975== ERROR SUMMARY: 3216 errors from 1 contexts (suppressed: 0 from 0)
% mediainfo 532116/original/orig_d89dd8f3f6aa4e20a1cf28c0e6f5dcb3.mp4 General
Complete name : 532116/original/orig_d89dd8f3f6aa4e20a1cf28c0e6f5dcb3.mp4
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42 (mp42/mp41)
File size : 12.4 MiB
Duration : 34 s 320 ms
Overall bit rate mode : Variable
Overall bit rate : 3 032 kb/s
Encoded date : UTC 2009-05-05 09:37:21
Tagged date : UTC 2009-05-05 09:37:21
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : Main@L3.1
Format settings : CABAC / 4 Ref Frames
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Format settings, GOP : M=1, N=33
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 34 s 320 ms
Bit rate mode : Variable
Bit rate : 3 005 kb/s
Maximum bit rate : 6 000 kb/s
Width : 720 pixels
Height : 576 pixels
Display aspect ratio : 1.85:1
Frame rate mode : Constant
Frame rate : 25.000 FPS
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Interlaced
Scan type, store method : Separated fields
Scan order : Bottom Field First
Bits/(Pixel*Frame) : 0.290
Stream size : 12.3 MiB (99%)
Language : English
Encoded date : UTC 2009-05-05 09:37:22
Tagged date : UTC 2009-05-05 09:37:22
Color range : Limited
Codec configuration box : avcC
Audio
ID : 2
Format : AAC LC SBR PS
Format/Info : Advanced Audio Codec Low Complexity with Spectral Band Replication and Parametric Stereo
Commercial name : HE-AACv2
Format settings : Implicit
Codec ID : mp4a-40-2
Duration : 34 s 320 ms
Source duration : 34 s 475 ms
Bit rate mode : Variable
Bit rate : 22.7 kb/s
Maximum bit rate : 33.2 kb/s
Channel(s) : 2 channels
Channel layout : C
Sampling rate : 48.0 kHz
Frame rate : 23.438 FPS (2048 SPF)
Compression mode : Lossy
Stream size : 95.1 KiB (1%)
Source stream size : 95.5 KiB (1%)
Language : English
Encoded date : UTC 2009-05-05 09:37:22
Tagged date : UTC 2009-05-05 09:37:22
%
--
Happy hacking
Petter Reinholdtsen
Reply to: