Bentu4 [8a2bf30](https://github.com/axiomatic-systems/Bento4/commit/8a2bf3081e610bc145e8df3b10671dad839dd007)
Host : Linux x3ero0-VirtualBox 5.8.0-25-generic #26-Ubuntu SMP Thu Oct 15 10:30:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
CMD : `mp4info --verbose poc.mp4`
POC : [poc.zip](https://drive.google.com/file/d/1Zv9oIPTSlIj5S7TdQmaFtY2UweROVmr0/view?usp=sharing)
```
File:
  major brand:      mp46
  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:           1
  type:         Video
  duration: 47535717 ms
  language: ```
  media:
    sample count: 0
    timescale:    12
    duration:     0 (media timescale units)
    duration:     0 (ms)
    bitrate (computed): 0.000 Kbps
  display width:  48.000000
  display height: 144.000000
=================================================================
==2409956==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00000126e781 at pc 0x000000496ba7 bp 0x7ffc8ab62fe0 sp 0x7ffc8ab627a8
READ of size 239 at 0x00000126e781 thread T0
    #0 0x496ba6 in __asan_memcpy (/home/x3ero0/Bento4/build/mp4info+0x496ba6)
    #1 0x576b79 in AP4_MemoryByteStream::WritePartial(void const*, unsigned int, unsigned int&) /home/x3ero0/Bento4/Source/C++/Core/Ap4ByteStream.cpp:785:5
    #2 0x56cb49 in AP4_ByteStream::Write(void const*, unsigned int) /home/x3ero0/Bento4/Source/C++/Core/Ap4ByteStream.cpp:77:29
    #3 0x5da617 in AP4_HdlrAtom::WriteFields(AP4_ByteStream&) /home/x3ero0/Bento4/Source/C++/Core/Ap4HdlrAtom.cpp:141:29
    #4 0x523a1d in AP4_Atom::Clone() /home/x3ero0/Bento4/Source/C++/Core/Ap4Atom.cpp:316:9
    #5 0x57e9c3 in AP4_ContainerAtom::Clone() /home/x3ero0/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:172:56
    #6 0x57e9c3 in AP4_ContainerAtom::Clone() /home/x3ero0/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:172:56
    #7 0x57e9c3 in AP4_ContainerAtom::Clone() /home/x3ero0/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:172:56
    #8 0x6abdbd in AP4_SampleDescription::AP4_SampleDescription(AP4_SampleDescription::Type, unsigned int, AP4_AtomParent*) /home/x3ero0/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:135:41
    #9 0x6abdbd in AP4_AvcSampleDescription::AP4_AvcSampleDescription(unsigned int, unsigned short, unsigned short, unsigned short, char const*, AP4_AtomParent*) /home/x3ero0/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:380:5
    #10 0x6d2dab in AP4_AvcSampleEntry::ToSampleDescription() /home/x3ero0/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:1146:16
    #11 0x700a0f in AP4_StsdAtom::GetSampleDescription(unsigned int) /home/x3ero0/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:181:53
    #12 0x4d5daa in ShowTrackInfo_Text(AP4_Movie&, AP4_Track&, AP4_ByteStream&, bool, bool, bool, bool) /home/x3ero0/Bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1351:52
    #13 0x4d5daa in ShowTrackInfo(AP4_Movie&, AP4_Track&, AP4_ByteStream&, bool, bool, bool, bool) /home/x3ero0/Bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1475:13
    #14 0x4d3bb4 in ShowTracks(AP4_Movie&, AP4_List<AP4_Track>&, AP4_ByteStream&, bool, bool, bool, bool) /home/x3ero0/Bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1586:9
    #15 0x4cbba9 in main /home/x3ero0/Bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1868:13
    #16 0x7f3d18450cb1 in __libc_start_main csu/../csu/libc-start.c:314:16
    #17 0x41d6dd in _start (/home/x3ero0/Bento4/build/mp4info+0x41d6dd)

0x00000126e781 is located 63 bytes to the left of global variable 'AP4_GlobalOptions::g_Entries' defined in '/home/x3ero0/Bento4/Source/C++/Core/Ap4Utils.cpp:38:56' (0x126e7c0) of size 8
0x00000126e781 is located 0 bytes to the right of global variable 'AP4_String::EmptyString' defined in '/home/x3ero0/Bento4/Source/C++/Core/Ap4String.cpp:39:18' (0x126e780) of size 1
  'AP4_String::EmptyString' is ascii string ''
SUMMARY: AddressSanitizer: global-buffer-overflow (/home/x3ero0/Bento4/build/mp4info+0x496ba6) in __asan_memcpy
Shadow bytes around the buggy address:
  0x000080245ca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245cc0: 00 00 00 00 00 00 00 00 04 f9 f9 f9 f9 f9 f9 f9
  0x000080245cd0: 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
  0x000080245ce0: 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
=>0x000080245cf0:[01]f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
  0x000080245d00: 00 00 00 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
  0x000080245d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==2409956==ABORTING
```
Global Buffer Overflow in mp4info
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : Global Buffer Overflow in mp4info
Issue date:

--- start body ---
Bentu4 [8a2bf30](https://github.com/axiomatic-systems/Bento4/commit/8a2bf3081e610bc145e8df3b10671dad839dd007)
Host : Linux x3ero0-VirtualBox 5.8.0-25-generic #26-Ubuntu SMP Thu Oct 15 10:30:38 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
CMD : `mp4info --verbose poc.mp4`
POC : [poc.zip](https://drive.google.com/file/d/1Zv9oIPTSlIj5S7TdQmaFtY2UweROVmr0/view?usp=sharing)
```
File:
  major brand:      mp46
  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:           1
  type:         Video
  duration: 47535717 ms
  language: ```
  media:
    sample count: 0
    timescale:    12
    duration:     0 (media timescale units)
    duration:     0 (ms)
    bitrate (computed): 0.000 Kbps
  display width:  48.000000
  display height: 144.000000
=================================================================
==2409956==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00000126e781 at pc 0x000000496ba7 bp 0x7ffc8ab62fe0 sp 0x7ffc8ab627a8
READ of size 239 at 0x00000126e781 thread T0
    #0 0x496ba6 in __asan_memcpy (/home/x3ero0/Bento4/build/mp4info+0x496ba6)
    #1 0x576b79 in AP4_MemoryByteStream::WritePartial(void const*, unsigned int, unsigned int&) /home/x3ero0/Bento4/Source/C++/Core/Ap4ByteStream.cpp:785:5
    #2 0x56cb49 in AP4_ByteStream::Write(void const*, unsigned int) /home/x3ero0/Bento4/Source/C++/Core/Ap4ByteStream.cpp:77:29
    #3 0x5da617 in AP4_HdlrAtom::WriteFields(AP4_ByteStream&) /home/x3ero0/Bento4/Source/C++/Core/Ap4HdlrAtom.cpp:141:29
    #4 0x523a1d in AP4_Atom::Clone() /home/x3ero0/Bento4/Source/C++/Core/Ap4Atom.cpp:316:9
    #5 0x57e9c3 in AP4_ContainerAtom::Clone() /home/x3ero0/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:172:56
    #6 0x57e9c3 in AP4_ContainerAtom::Clone() /home/x3ero0/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:172:56
    #7 0x57e9c3 in AP4_ContainerAtom::Clone() /home/x3ero0/Bento4/Source/C++/Core/Ap4ContainerAtom.cpp:172:56
    #8 0x6abdbd in AP4_SampleDescription::AP4_SampleDescription(AP4_SampleDescription::Type, unsigned int, AP4_AtomParent*) /home/x3ero0/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:135:41
    #9 0x6abdbd in AP4_AvcSampleDescription::AP4_AvcSampleDescription(unsigned int, unsigned short, unsigned short, unsigned short, char const*, AP4_AtomParent*) /home/x3ero0/Bento4/Source/C++/Core/Ap4SampleDescription.cpp:380:5
    #10 0x6d2dab in AP4_AvcSampleEntry::ToSampleDescription() /home/x3ero0/Bento4/Source/C++/Core/Ap4SampleEntry.cpp:1146:16
    #11 0x700a0f in AP4_StsdAtom::GetSampleDescription(unsigned int) /home/x3ero0/Bento4/Source/C++/Core/Ap4StsdAtom.cpp:181:53
    #12 0x4d5daa in ShowTrackInfo_Text(AP4_Movie&, AP4_Track&, AP4_ByteStream&, bool, bool, bool, bool) /home/x3ero0/Bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1351:52
    #13 0x4d5daa in ShowTrackInfo(AP4_Movie&, AP4_Track&, AP4_ByteStream&, bool, bool, bool, bool) /home/x3ero0/Bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1475:13
    #14 0x4d3bb4 in ShowTracks(AP4_Movie&, AP4_List<AP4_Track>&, AP4_ByteStream&, bool, bool, bool, bool) /home/x3ero0/Bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1586:9
    #15 0x4cbba9 in main /home/x3ero0/Bento4/Source/C++/Apps/Mp4Info/Mp4Info.cpp:1868:13
    #16 0x7f3d18450cb1 in __libc_start_main csu/../csu/libc-start.c:314:16
    #17 0x41d6dd in _start (/home/x3ero0/Bento4/build/mp4info+0x41d6dd)

0x00000126e781 is located 63 bytes to the left of global variable 'AP4_GlobalOptions::g_Entries' defined in '/home/x3ero0/Bento4/Source/C++/Core/Ap4Utils.cpp:38:56' (0x126e7c0) of size 8
0x00000126e781 is located 0 bytes to the right of global variable 'AP4_String::EmptyString' defined in '/home/x3ero0/Bento4/Source/C++/Core/Ap4String.cpp:39:18' (0x126e780) of size 1
  'AP4_String::EmptyString' is ascii string ''
SUMMARY: AddressSanitizer: global-buffer-overflow (/home/x3ero0/Bento4/build/mp4info+0x496ba6) in __asan_memcpy
Shadow bytes around the buggy address:
  0x000080245ca0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245cb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245cc0: 00 00 00 00 00 00 00 00 04 f9 f9 f9 f9 f9 f9 f9
  0x000080245cd0: 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
  0x000080245ce0: 00 00 00 00 00 00 00 00 00 f9 f9 f9 f9 f9 f9 f9
=>0x000080245cf0:[01]f9 f9 f9 f9 f9 f9 f9 00 f9 f9 f9 f9 f9 f9 f9
  0x000080245d00: 00 00 00 f9 f9 f9 f9 f9 00 00 00 00 00 00 00 00
  0x000080245d10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245d20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245d30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x000080245d40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==2409956==ABORTING
```
--- end body ---
