Bento4 icon indicating copy to clipboard operation
Bento4 copied to clipboard

StackOverflow-GetCodecString-Ap4SampleDescription_cpp-402-Ap4SampleDescription.cpp:398

Open qhjchc opened this issue 3 years ago • 1 comments

System info

Ubuntu 16.04 xenial, gcc (Ubuntu 5.5.0-12ubuntu1), Bento4 (latest master 8a2bf3)

Command line

mp4info --show-layout --show-samples --show-sample-data @@

Output

File:
  major brand:      mp42
  minor version:    12a007e
  compatible brand: mp42
  compatible brand: isom
  fast start:       no

Movie:
  duration:   90000 (media timescale units)
  duration:   1000 (ms)
  time scale: 90000
  fragments:  no

Found 1 Tracks
Track 1:
  flags:        7 ENABLED IN-MOVIE IN-PREVIEW
  id:           -16777215
  type:         Unknown []
  duration: 1000 ms
  language: (null)
  media:
    sample count: 0
    timescale:    0
    duration:     0 (media timescale units)
    duration:     0 (ms)
    bitrate (computed): 0.000 Kbps
  display width:  48.000000
  display height: 144.000000
  Sample Description 0
    Coding:       avc1 (H.264)
[1]    72003 segmentation fault  ./crashes-binary/gcc-asan/bento4/gcc-mp4info --show-layout --show-samples

AddressSanitizer output

File:
  major brand:      mp42
  minor version:    12a007e
  compatible brand: mp42
  compatible brand: isom
  fast start:       no

Movie:
  duration:   90000 (media timescale units)
  duration:   1000 (ms)
  time scale: 90000
  fragments:  no

Found 1 Tracks
Track 1:
  flags:        7 ENABLED IN-MOVIE IN-PREVIEW
  id:           -16777215
  type:         Unknown []
  duration: 1000 ms
  language: (null)
  media:
    sample count: 0
    timescale:    0
    duration:     0 (media timescale units)
    duration:     0 (ms)
    bitrate (computed): 0.000 Kbps
  display width:  48.000000
  display height: 144.000000
  Sample Description 0
    Coding:       avc1 (H.264)
ASAN:SIGSEGV
=================================================================
==63888==ERROR: AddressSanitizer: stack-overflow on address 0x7ffc4b846f98 (pc 0x0000004a19f0 bp 0x7ffc4b8470c0 sp 0x7ffc4b846f80 T0)
    #0 0x4a19ef in AP4_AvcSampleDescription::GetCodecString(AP4_String&) ../../bento4/Source/C++/Core/Ap4SampleDescription.cpp:398
    #1 0x455c1e in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) ../../bento4/Source/C++/Core/Ap4DvccAtom.cpp:171
    #2 0x4a1b02 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) ../../bento4/Source/C++/Core/Ap4SampleDescription.cpp:402
    #3 0x455c1e in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) ../../bento4/Source/C++/Core/Ap4DvccAtom.cpp:171
    #4 0x4a1b02 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) ../../bento4/Source/C++/Core/Ap4SampleDescription.cpp:402
    #5 0x455c1e in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) ../../bento4/Source/C++/Core/Ap4DvccAtom.cpp:171
    #6 0x4a1b02 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) ../../bento4/Source/C++/Core/Ap4SampleDescription.cpp:402
    #7 0x455c1e in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) ../../bento4/Source/C++/Core/Ap4DvccAtom.cpp:171
    #8 0x4a1b02 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) ../../bento4/Source/C++/Core/Ap4SampleDescription.cpp:402
    #9 0x455c1e in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) ../../bento4/Source/C++/Core/Ap4DvccAtom.cpp:171
    ...
    #250 0x4a1b02 in AP4_AvcSampleDescription::GetCodecString(AP4_String&) ../../bento4/Source/C++/Core/Ap4SampleDescription.cpp:402
    #251 0x455c1e in AP4_DvccAtom::GetCodecString(AP4_SampleDescription*, AP4_String&) ../../bento4/Source/C++/Core/Ap4DvccAtom.cpp:171

SUMMARY: AddressSanitizer: stack-overflow ../../bento4/Source/C++/Core/Ap4SampleDescription.cpp:398 AP4_AvcSampleDescription::GetCodecString(AP4_String&)
==63888==ABORTING

POC

StackOverflow-GetCodecString-Ap4SampleDescription_cpp-402.zip

qhjchc avatar Jul 21 '21 03:07 qhjchc

@barbibulle I can look into and fix some of these fuzzing issues, if you want. Let me know.

dimitry-ishenko avatar Oct 23 '21 18:10 dimitry-ishenko