An issue was discovered in Bento4 1.5.1.0. There is a SEGV in the function AP4_TfhdAtom::SetDefaultSampleSize at Core/Ap4TfhdAtom.h when called from AP4_Processor::ProcessFragments in Core/Ap4Processor.cpp.
cpe:2.3:a:axiosys:bento4:1.5.1.0:*:*:*:*:*:*:*
83B32974-D913-4DDB-844F-C58D55ECC17E
OR
# bento4

## version 

    bento4 1.5.1.0

## description

```txt
None
```

## download link

    None

## others

    please send email to  teamseri0us360@gmail.com if you have any questions.

---------------------

## AP4_TfhdAtom::SetDefaultSampleSize@Ap4TfhdAtom.h-80___SEGV_UNKNOW

### description

    An issue was discovered in bento4 1.5.1.0, There is a/an SEGV_UNKNOW in function AP4_TfhdAtom::SetDefaultSampleSize at Ap4TfhdAtom.h-80

### commandline

    mp4edit @@ a.mp4

### source

```c
  76     void     SetSampleDescriptionIndex(AP4_UI32 indx)    { m_SampleDescriptionIndex = indx;    }
  77     AP4_UI32 GetDefaultSampleDuration()                  { return m_DefaultSampleDuration;     }
  78     void     SetDefaultSampleDuration(AP4_UI32 duration) { m_DefaultSampleDuration = duration; }
  79     AP4_UI32 GetDefaultSampleSize()                      { return m_DefaultSampleSize;         }
  80     void     SetDefaultSampleSize(AP4_UI32 size)         { m_DefaultSampleSize = size;         }
  81     AP4_UI32 GetDefaultSampleFlags()                     { return m_DefaultSampleFlags;        }
  82     void     SetDefaultSampleFlags(AP4_UI32 flags)       { m_DefaultSampleFlags = flags;       }
  83 
  84     void UpdateFlags(AP4_UI32 flags);
  85     

```

### bug report

```txt
ASAN:SIGSEGV
=================================================================
==16948==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x000000498774 bp 0x7ffdcfa6e2e0 sp 0x7ffdcfa6df60 T0)
    #0 0x498773 in AP4_TfhdAtom::SetDefaultSampleSize(unsigned int) /src/bento4/Source/C++/Core/Ap4TfhdAtom.h:80
    #1 0x498773 in AP4_Processor::ProcessFragments(AP4_MoovAtom*, AP4_List<AP4_AtomLocator>&, AP4_ContainerAtom*, AP4_SidxAtom*, unsigned long long, AP4_ByteStream&, AP4_ByteStream&) /src/bento4/Source/C++/Core/Ap4Processor.cpp:331
    #2 0x4a68d0 in AP4_Processor::Process(AP4_ByteStream&, AP4_ByteStream&, AP4_ByteStream*, AP4_Processor::ProgressListener*, AP4_AtomFactory&) /src/bento4/Source/C++/Core/Ap4Processor.cpp:711
    #3 0x43f413 in main /src/bento4/Source/C++/Apps/Mp4Edit/Mp4Edit.cpp:451
    #4 0x7fc7db40082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #5 0x442b88 in _start (/src/aflbuild/installed/bin/mp4edit+0x442b88)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /src/bento4/Source/C++/Core/Ap4TfhdAtom.h:80 AP4_TfhdAtom::SetDefaultSampleSize(unsigned int)
==16948==ABORTING

```

### others

    from fuzz project pwd-bento4-mp4edit-00
    crash name pwd-bento4-mp4edit-00-00000631-20190828.mp4
    Auto-generated by pyspider at 2019-08-28 22:40:24
    
    please send email to  teamseri0us360@gmail.com if you have any questions.

[poc3.tar.gz](https://github.com/axiomatic-systems/Bento4/files/3640457/poc3.tar.gz)

SEGV_UNKNOW was discovered in AP4_TfhdAtom::SetDefaultSampleSize in Ap4TfhdAtom.h-
This is a GitHub Issue
repo:Bento4
owner:axiomatic-systems
Title : SEGV_UNKNOW was discovered in AP4_TfhdAtom::SetDefaultSampleSize in Ap4TfhdAtom.h-
Issue date:

--- start body ---
# bento4

## version 

    bento4 1.5.1.0

## description

```txt
None
```

## download link

    None

## others

    please send email to  teamseri0us360@gmail.com if you have any questions.

---------------------

## AP4_TfhdAtom::SetDefaultSampleSize@Ap4TfhdAtom.h-80___SEGV_UNKNOW

### description

    An issue was discovered in bento4 1.5.1.0, There is a/an SEGV_UNKNOW in function AP4_TfhdAtom::SetDefaultSampleSize at Ap4TfhdAtom.h-80

### commandline

    mp4edit @@ a.mp4

### source

```c
  76     void     SetSampleDescriptionIndex(AP4_UI32 indx)    { m_SampleDescriptionIndex = indx;    }
  77     AP4_UI32 GetDefaultSampleDuration()                  { return m_DefaultSampleDuration;     }
  78     void     SetDefaultSampleDuration(AP4_UI32 duration) { m_DefaultSampleDuration = duration; }
  79     AP4_UI32 GetDefaultSampleSize()                      { return m_DefaultSampleSize;         }
  80     void     SetDefaultSampleSize(AP4_UI32 size)         { m_DefaultSampleSize = size;         }
  81     AP4_UI32 GetDefaultSampleFlags()                     { return m_DefaultSampleFlags;        }
  82     void     SetDefaultSampleFlags(AP4_UI32 flags)       { m_DefaultSampleFlags = flags;       }
  83 
  84     void UpdateFlags(AP4_UI32 flags);
  85     

```

### bug report

```txt
ASAN:SIGSEGV
=================================================================
==16948==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000004 (pc 0x000000498774 bp 0x7ffdcfa6e2e0 sp 0x7ffdcfa6df60 T0)
    #0 0x498773 in AP4_TfhdAtom::SetDefaultSampleSize(unsigned int) /src/bento4/Source/C++/Core/Ap4TfhdAtom.h:80
    #1 0x498773 in AP4_Processor::ProcessFragments(AP4_MoovAtom*, AP4_List<AP4_AtomLocator>&, AP4_ContainerAtom*, AP4_SidxAtom*, unsigned long long, AP4_ByteStream&, AP4_ByteStream&) /src/bento4/Source/C++/Core/Ap4Processor.cpp:331
    #2 0x4a68d0 in AP4_Processor::Process(AP4_ByteStream&, AP4_ByteStream&, AP4_ByteStream*, AP4_Processor::ProgressListener*, AP4_AtomFactory&) /src/bento4/Source/C++/Core/Ap4Processor.cpp:711
    #3 0x43f413 in main /src/bento4/Source/C++/Apps/Mp4Edit/Mp4Edit.cpp:451
    #4 0x7fc7db40082f in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
    #5 0x442b88 in _start (/src/aflbuild/installed/bin/mp4edit+0x442b88)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /src/bento4/Source/C++/Core/Ap4TfhdAtom.h:80 AP4_TfhdAtom::SetDefaultSampleSize(unsigned int)
==16948==ABORTING

```

### others

    from fuzz project pwd-bento4-mp4edit-00
    crash name pwd-bento4-mp4edit-00-00000631-20190828.mp4
    Auto-generated by pyspider at 2019-08-28 22:40:24
    
    please send email to  teamseri0us360@gmail.com if you have any questions.

[poc3.tar.gz](https://github.com/axiomatic-systems/Bento4/files/3640457/poc3.tar.gz)

--- end body ---

comments :
--- start comments ---

--- end comments ---