Bento4 1.5.1.0 has a NULL pointer dereference in AP4_DescriptorListWriter::Action in Core/Ap4Descriptor.h, related to AP4_IodsAtom::WriteFields in Core/Ap4IodsAtom.cpp, as demonstrated by mp4encrypt or mp4compact.
cpe:2.3:a:axiosys:bento4:1.5.1.0:*:*:*:*:*:*:*
83B32974-D913-4DDB-844F-C58D55ECC17E
OR
**System Details**
Commit ID: bc1b02a
Test Machine : Ubuntu 16.04.3 LTS
MP4 Compacter - Version 1.0
(Bento4 Version 1.5.1.0)

**Command**
mp4compact POC /dev/null

**ASAN Output**
```
ASAN:DEADLYSIGNAL
=================================================================
==5286==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000544c94 bp 0x7ffd515e2390 sp 0x7ffd515e22b0 T0)
    #0 0x544c93 in AP4_DescriptorListWriter::Action(AP4_Descriptor*) const /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Descriptor.h:108:16
    #1 0x698656 in AP4_List<AP4_Descriptor>::Apply(AP4_List<AP4_Descriptor>::Item::Operator const&) const /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4List.h:353:9
    #2 0x698656 in AP4_InitialObjectDescriptor::WriteFields(AP4_ByteStream&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4ObjectDescriptor.cpp:300
    #3 0x5974e8 in AP4_Expandable::Write(AP4_ByteStream&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Expandable.cpp:105:5
    #4 0x585e34 in AP4_IodsAtom::WriteFields(AP4_ByteStream&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4IodsAtom.cpp:99:36
    #5 0x536b11 in AP4_Atom::Write(AP4_ByteStream&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Atom.cpp:229:14
    #6 0x53c322 in AP4_AtomListWriter::Action(AP4_Atom*) const /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Atom.cpp:753:5
    #7 0x54dbfe in AP4_List<AP4_Atom>::Apply(AP4_List<AP4_Atom>::Item::Operator const&) const /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4List.h:353:9
    #8 0x54dbfe in AP4_Processor::Process(AP4_ByteStream&, AP4_ByteStream&, AP4_ByteStream*, AP4_Processor::ProgressListener*, AP4_AtomFactory&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Processor.cpp:644
    #9 0x5262cf in main /home/fuzzer/victim/Bento4/Source/C++/Apps/Mp4Compact/Mp4Compact.cpp:220:14
    #10 0x7f91a991a82f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291
    #11 0x4509e8 in _start (/home/fuzzer/victim/Bento4/mp4compact+0x4509e8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Descriptor.h:108:16 in AP4_DescriptorListWriter::Action(AP4_Descriptor*) const
==5286==ABORTING
```
SEGV in mp4compact
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : SEGV in mp4compact
Issue date:

--- start body ---
**System Details**
Commit ID: bc1b02a
Test Machine : Ubuntu 16.04.3 LTS
MP4 Compacter - Version 1.0
(Bento4 Version 1.5.1.0)

**Command**
mp4compact POC /dev/null

**ASAN Output**
```
ASAN:DEADLYSIGNAL
=================================================================
==5286==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x000000544c94 bp 0x7ffd515e2390 sp 0x7ffd515e22b0 T0)
    #0 0x544c93 in AP4_DescriptorListWriter::Action(AP4_Descriptor*) const /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Descriptor.h:108:16
    #1 0x698656 in AP4_List<AP4_Descriptor>::Apply(AP4_List<AP4_Descriptor>::Item::Operator const&) const /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4List.h:353:9
    #2 0x698656 in AP4_InitialObjectDescriptor::WriteFields(AP4_ByteStream&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4ObjectDescriptor.cpp:300
    #3 0x5974e8 in AP4_Expandable::Write(AP4_ByteStream&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Expandable.cpp:105:5
    #4 0x585e34 in AP4_IodsAtom::WriteFields(AP4_ByteStream&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4IodsAtom.cpp:99:36
    #5 0x536b11 in AP4_Atom::Write(AP4_ByteStream&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Atom.cpp:229:14
    #6 0x53c322 in AP4_AtomListWriter::Action(AP4_Atom*) const /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Atom.cpp:753:5
    #7 0x54dbfe in AP4_List<AP4_Atom>::Apply(AP4_List<AP4_Atom>::Item::Operator const&) const /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4List.h:353:9
    #8 0x54dbfe in AP4_Processor::Process(AP4_ByteStream&, AP4_ByteStream&, AP4_ByteStream*, AP4_Processor::ProgressListener*, AP4_AtomFactory&) /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Processor.cpp:644
    #9 0x5262cf in main /home/fuzzer/victim/Bento4/Source/C++/Apps/Mp4Compact/Mp4Compact.cpp:220:14
    #10 0x7f91a991a82f in __libc_start_main /build/glibc-LK5gWL/glibc-2.23/csu/../csu/libc-start.c:291
    #11 0x4509e8 in _start (/home/fuzzer/victim/Bento4/mp4compact+0x4509e8)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/fuzzer/victim/Bento4/Source/C++/Core/Ap4Descriptor.h:108:16 in AP4_DescriptorListWriter::Action(AP4_Descriptor*) const
==5286==ABORTING
```
--- end body ---

comments :
--- start comments ---

--- end comments ---