## Description
There is a segment fault detected by AddressSanitizer

## System info
```
Ubuntu 20.04.2 LTS
clang version 12.0.0-++20210402082642+04ba60cfe598-1~exp1~20210402063359.71
MP4Box - GPAC version 1.1.0-DEV-rev1740-gbd98129fd-master
```

## Build command
```
./configure --static-mp4box --prefix=`realpath ./install` --enable-sanitizer --cc=clang --cxx=clang++
```

## crash command
```
MP4Box -flat -out /dev/null poc_file
```

## Pocs

[poc.zip](https://github.com/gpac/gpac/files/8032708/poc.zip)


## Crash output
```
==30676==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000040 (pc 0x0000007f9b6b bp 0x7ffd0126e890 sp 0x7ffd0126c600 T0)
==30676==The signal is caused by a READ memory access.
==30676==Hint: address points to the zero page.
    #0 0x7f9b6b in DoWriteMeta /programs/mp4box/builds/build12/src/isomedia/isom_store.c:763:13
    #1 0x7faf65 in DoWrite /programs/mp4box/builds/build12/src/isomedia/isom_store.c:928:8
    #2 0x802ec2 in WriteFlat /programs/mp4box/builds/build12/src/isomedia/isom_store.c:1170:10
    #3 0x800b2a in WriteToFile /programs/mp4box/builds/build12/src/isomedia/isom_store.c
    #4 0x7d3607 in gf_isom_write /programs/mp4box/builds/build12/src/isomedia/isom_read.c:600:8
    #5 0x7d3bd3 in gf_isom_close /programs/mp4box/builds/build12/src/isomedia/isom_read.c:624:6
    #6 0x4e765f in mp4boxMain /programs/mp4box/builds/build12/applications/mp4box/main.c:6547:7
    #7 0x7fd809faf0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #8 0x41ea6d in _start (/programs/mp4box/builds/build12/bin/gcc/MP4Box+0x41ea6d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /programs/mp4box/builds/build12/src/isomedia/isom_store.c:763:13 in DoWriteMeta
==30676==ABORTING
```
There is a segment fault detected by AddressSanitizer
This is a GitHub Issue
repo:gpac
owner:gpac
Title : There is a segment fault detected by AddressSanitizer
Issue date:

--- start body ---
## Description
There is a segment fault detected by AddressSanitizer

## System info
```
Ubuntu 20.04.2 LTS
clang version 12.0.0-++20210402082642+04ba60cfe598-1~exp1~20210402063359.71
MP4Box - GPAC version 1.1.0-DEV-rev1740-gbd98129fd-master
```

## Build command
```
./configure --static-mp4box --prefix=`realpath ./install` --enable-sanitizer --cc=clang --cxx=clang++
```

## crash command
```
MP4Box -flat -out /dev/null poc_file
```

## Pocs

[poc.zip](https://github.com/gpac/gpac/files/8032708/poc.zip)


## Crash output
```
==30676==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000040 (pc 0x0000007f9b6b bp 0x7ffd0126e890 sp 0x7ffd0126c600 T0)
==30676==The signal is caused by a READ memory access.
==30676==Hint: address points to the zero page.
    #0 0x7f9b6b in DoWriteMeta /programs/mp4box/builds/build12/src/isomedia/isom_store.c:763:13
    #1 0x7faf65 in DoWrite /programs/mp4box/builds/build12/src/isomedia/isom_store.c:928:8
    #2 0x802ec2 in WriteFlat /programs/mp4box/builds/build12/src/isomedia/isom_store.c:1170:10
    #3 0x800b2a in WriteToFile /programs/mp4box/builds/build12/src/isomedia/isom_store.c
    #4 0x7d3607 in gf_isom_write /programs/mp4box/builds/build12/src/isomedia/isom_read.c:600:8
    #5 0x7d3bd3 in gf_isom_close /programs/mp4box/builds/build12/src/isomedia/isom_read.c:624:6
    #6 0x4e765f in mp4boxMain /programs/mp4box/builds/build12/applications/mp4box/main.c:6547:7
    #7 0x7fd809faf0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
    #8 0x41ea6d in _start (/programs/mp4box/builds/build12/bin/gcc/MP4Box+0x41ea6d)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /programs/mp4box/builds/build12/src/isomedia/isom_store.c:763:13 in DoWriteMeta
==30676==ABORTING
```
--- end body ---
