Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NULL pointer reference from AP4_DescriptorFinder::Test() in v1.6.0-640 #875

Closed
Hee-won opened this issue Jun 12, 2023 · 1 comment
Closed
Assignees
Labels

Comments

@Hee-won
Copy link

Hee-won commented Jun 12, 2023

Hi,

There still exists the null pointer reference bug in the latest version (1.6.0-640) of mp4info by the function AP4_DescriptorFinder::Test().

Here is the output of program with address sanitizer attached.

Bug Report

File:
major brand: isom
minor version: 200
compatible brand: isom
compatible brand: iso2
compatible brand: avc1
compatible brand: mp41
fast start: yes

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

Found 2 Tracks
Track 1:
flags: 3 ENABLED IN-MOVIE
id: 1
type: Video
duration: 4600 ms
language: eng
media:
sample count: 138
timescale: 15360
duration: 70656 (media timescale units)
duration: 4600 (ms)
bitrate (computed): 6623656.562 Kbps
display width: 480.000000
display height: 480.000000
frame rate (computed): 30.000
Sample Description 0
Coding: avc1 (H.264)
Codec String: avc1.42C01E
AVC Profile: 66 (Baseline)
AVC Profile Compat: c0
AVC Level: 30
AVC NALU Length Size: 4
AVC SPS: [6742c01eda0783db0110000003001000000303c0f162ea]
AVC PPS: [68ce092c80]
Width: 480
Height: 480
Depth: 24
Track 2:
flags: 3 ENABLED IN-MOVIE
id: 2
type: Audio
duration: 4673 ms
language: eng
media:
sample count: 200
timescale: 44100
duration: 206060 (media timescale units)
duration: 4673 (ms)
bitrate (computed): 28737.402 Kbps
AddressSanitizer:DEADLYSIGNAL

=================================================================
==973829==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000008 (pc 0x56038ea4c20e bp 0x7ffdee3bfe40 sp 0x7ffdee3bfdc0 T0)
==973829==The signal is caused by a READ memory access.
==973829==Hint: address points to the zero page.
#0 0x56038ea4c20d in AP4_DescriptorFinder::Test(AP4_Descriptor*) const /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Core/Ap4Descriptor.h:92
#1 0x56038ea4c20d in AP4_List<AP4_Descriptor>::Find(AP4_List<AP4_Descriptor>::Item::Finder const&, AP4_Descriptor*&) const /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Core/Ap4List.h:431
#2 0x56038ea4c20d in AP4_EsDescriptor::GetDecoderConfigDescriptor() const /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Core/Ap4EsDescriptor.cpp:207
#3 0x56038e9e0f2e in AP4_MpegSampleDescription::AP4_MpegSampleDescription(unsigned int, AP4_EsdsAtom*) /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Core/Ap4SampleDescription.cpp:886
#4 0x56038e9e1566 in AP4_MpegAudioSampleDescription::AP4_MpegAudioSampleDescription(unsigned int, unsigned short, unsigned short, AP4_EsdsAtom*) /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Core/Ap4SampleDescription.cpp:1000
#5 0x56038e9e4cd3 in AP4_MpegAudioSampleEntry::ToSampleDescription() /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Core/Ap4SampleEntry.cpp:678
#6 0x56038e9f8a2c in AP4_StsdAtom::GetSampleDescription(unsigned int) /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Core/Ap4StsdAtom.cpp:181
#7 0x56038e95544e in ShowTrackInfo_Text /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1351
#8 0x56038e95544e in ShowTrackInfo /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1475
#9 0x56038e955b42 in ShowTracks /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1586
#10 0x56038e9466f4 in main /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1868
#11 0x7fe97e71a082 in __libc_start_main ../csu/libc-start.c:308
#12 0x56038e94a7ed in _start (/home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/build/mp4info+0x447ed)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/ubuntu/targets/Bento4-1.6.0-639_sanitizer/Source/C++/Core/Ap4Descriptor.h:92 in AP4_DescriptorFinder::Test(AP4_Descriptor*) const
==973829==ABORTING

Envionment

OS: Ubuntu 20.04.5 LTS x86_64
Release: v1.6.0-640
Program: mp4info

How to reproduce

$ mp4info poc-file
poc-file is attached.
poc-file.txt

@barbibulle barbibulle self-assigned this Feb 17, 2024
@barbibulle
Copy link
Contributor

Not able to reproduce on master branch. Closing as fixed. Please reopen if you still see the issue on your side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants