**System info**
Ubuntu x86_64, clang 10.0
version: 0.12.4.4643, last commit [93c2512](https://github.com/LibreDWG/libredwg/commit/93c25124c191987af168ace9fe4b5623061874bd)

**Command line**
./dwg2dxf poc

Poc
poc : [poc](https://github.com/iorra-cifer/Poc/blob/main/libredwg/Nullpointer_1?raw=true)

**AddressSanitizer output**
==4083101==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000111d409 bp 0x7ffc26188290 sp 0x7ffc26188000 T0)
==4083101==The signal is caused by a READ memory access.
==4083101==Hint: address points to the zero page.
    #0 0x111d409 in decode_preR13 /home/SVF-tools/example/libredwg-2/src/decode_r11.c:740:11
    #1 0x4fb4b6 in dwg_decode /home/SVF-tools/example/libredwg-2/src/decode.c:211:17
    #2 0x4c6dcc in dwg_read_file /home/SVF-tools/example/libredwg-2/src/dwg.c:254:11
    #3 0x4c4a40 in main /home/SVF-tools/example/libredwg-2/programs/dwg2dxf.c:258:15
    #4 0x7fbb9e630c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
    #5 0x41b649 in _start (/home/SVF-tools/example/libredwg-2/fuzz/dwg2dxf.ci+0x41b649)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/SVF-tools/example/libredwg-2/src/decode_r11.c:740:11 in decode_preR13
==4083101==ABORTING

A NULL pointer dereference exists in the function decode_preR13 in decode_r11.c
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : A NULL pointer dereference exists in the function decode_preR13 in decode_r11.c
Issue date:

--- start body ---
**System info**
Ubuntu x86_64, clang 10.0
version: 0.12.4.4643, last commit [93c2512](https://github.com/LibreDWG/libredwg/commit/93c25124c191987af168ace9fe4b5623061874bd)

**Command line**
./dwg2dxf poc

Poc
poc : [poc](https://github.com/iorra-cifer/Poc/blob/main/libredwg/Nullpointer_1?raw=true)

**AddressSanitizer output**
==4083101==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x00000111d409 bp 0x7ffc26188290 sp 0x7ffc26188000 T0)
==4083101==The signal is caused by a READ memory access.
==4083101==Hint: address points to the zero page.
    #0 0x111d409 in decode_preR13 /home/SVF-tools/example/libredwg-2/src/decode_r11.c:740:11
    #1 0x4fb4b6 in dwg_decode /home/SVF-tools/example/libredwg-2/src/decode.c:211:17
    #2 0x4c6dcc in dwg_read_file /home/SVF-tools/example/libredwg-2/src/dwg.c:254:11
    #3 0x4c4a40 in main /home/SVF-tools/example/libredwg-2/programs/dwg2dxf.c:258:15
    #4 0x7fbb9e630c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310
    #5 0x41b649 in _start (/home/SVF-tools/example/libredwg-2/fuzz/dwg2dxf.ci+0x41b649)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/SVF-tools/example/libredwg-2/src/decode_r11.c:740:11 in decode_preR13
==4083101==ABORTING

--- end body ---
