## Affected version 

the latest commit: https://github.com/LibreDWG/libredwg/tree/45d2a290c65ed691be0901ba2b2ef51044e07a16 and 0.12.4

## What's the problem?


Segmentation fault in dwg_dxf_SHAPE_private in dwg.spec because of reading unknown address.

ASAN report:

```
==19598==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000ee56f3 bp 0x7fffffffcc10 sp 0x7fffffffcbe0 T0)
==19598==The signal is caused by a READ memory access.
==19598==Hint: this fault was caused by a dereference of a high value address (see register values below).  Disassemble the provided pc to learn which register was used.
    #0 0xee56f3 in dwg_dxf_SHAPE_private /src/libredwg/src/./dwg.spec
    #1 0xea0f59 in dwg_dxf_SHAPE /src/libredwg/src/./dwg.spec:1642:1
    #2 0xe95ea0 in dwg_dxf_object /src/libredwg/src/out_dxf.c:2680:14
    #3 0xe6817c in dxf_entities_write /src/libredwg/src/out_dxf.c:3532:16
    #4 0xe41b4c in dwg_write_dxf /src/libredwg/src/out_dxf.c:3682:7
    #5 0x4c864b in main /src/libredwg/programs/dxfwrite.c:451:11
    #6 0x7ffff6ee383f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #7 0x41bc98 in _start (/mnt/disk/out/libredwg/programs_asan/dxfwrite+0x41bc98)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /src/libredwg/src/./dwg.spec in dwg_dxf_SHAPE_private
==19598==ABORTING
```


## Compile command

```
CC="clang" CFLAGS="-O1 -g -fsanitize=address" ./configure --enable-release --disable-shared && make
```

## How can we reproduce the issue?

```
unzip tests_64258.zip
dxfwrite -I DWG -o /dev/null -y ./tests_64258
```
POC file :  
[tests_64258.zip](https://github.com/LibreDWG/libredwg/files/6635566/tests_64258.zip)


READ unknown address in dwg_dxf_SHAPE_private in dwg.spec
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : READ unknown address in dwg_dxf_SHAPE_private in dwg.spec
Issue date:

--- start body ---
## Affected version 

the latest commit: https://github.com/LibreDWG/libredwg/tree/45d2a290c65ed691be0901ba2b2ef51044e07a16 and 0.12.4

## What's the problem?


Segmentation fault in dwg_dxf_SHAPE_private in dwg.spec because of reading unknown address.

ASAN report:

```
==19598==ERROR: AddressSanitizer: SEGV on unknown address (pc 0x000000ee56f3 bp 0x7fffffffcc10 sp 0x7fffffffcbe0 T0)
==19598==The signal is caused by a READ memory access.
==19598==Hint: this fault was caused by a dereference of a high value address (see register values below).  Disassemble the provided pc to learn which register was used.
    #0 0xee56f3 in dwg_dxf_SHAPE_private /src/libredwg/src/./dwg.spec
    #1 0xea0f59 in dwg_dxf_SHAPE /src/libredwg/src/./dwg.spec:1642:1
    #2 0xe95ea0 in dwg_dxf_object /src/libredwg/src/out_dxf.c:2680:14
    #3 0xe6817c in dxf_entities_write /src/libredwg/src/out_dxf.c:3532:16
    #4 0xe41b4c in dwg_write_dxf /src/libredwg/src/out_dxf.c:3682:7
    #5 0x4c864b in main /src/libredwg/programs/dxfwrite.c:451:11
    #6 0x7ffff6ee383f in __libc_start_main /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:291
    #7 0x41bc98 in _start (/mnt/disk/out/libredwg/programs_asan/dxfwrite+0x41bc98)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /src/libredwg/src/./dwg.spec in dwg_dxf_SHAPE_private
==19598==ABORTING
```


## Compile command

```
CC="clang" CFLAGS="-O1 -g -fsanitize=address" ./configure --enable-release --disable-shared && make
```

## How can we reproduce the issue?

```
unzip tests_64258.zip
dxfwrite -I DWG -o /dev/null -y ./tests_64258
```
POC file :  
[tests_64258.zip](https://github.com/LibreDWG/libredwg/files/6635566/tests_64258.zip)


--- end body ---
