Attached reproduction case, tested against latest git version using ASAN enabled. I noticed two similar reports on the same function but those are already closed as fixed.

[decode_preR13_section_hdr.zip](https://github.com/LibreDWG/libredwg/files/10441807/decode_preR13_section_hdr.zip)

```
./dwgread decode_preR13_section_hdr.dwg 
=================================================================
==2306955==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x618000000404 at pc 0x7ffff60e3888 bp 0x7fffffffc060 sp 0x7fffffffc058
WRITE of size 4 at 0x618000000404 thread T0
    #0 0x7ffff60e3887 in decode_preR13_section_hdr /home/fmunozs/fuzz/libredwg/src/decode_r11.c:141:13
    #1 0x7ffff60e151a in decode_preR13 /home/fmunozs/fuzz/libredwg/src/decode_r11.c:838:11
    #2 0x7ffff5e8678e in dwg_decode /home/fmunozs/fuzz/libredwg/src/decode.c:213:17
    #3 0x7ffff6109aab in dwg_read_file /home/fmunozs/fuzz/libredwg/src/dwg.c:255:11
    #4 0x555555670e8a in main /home/fmunozs/fuzz/libredwg/programs/dwgread.c
    #5 0x7ffff599528f  (/usr/lib/libc.so.6+0x2328f) (BuildId: 1e94beb079e278ac4f2c8bce1f53091548ea1584)
    #6 0x7ffff5995349 in __libc_start_main (/usr/lib/libc.so.6+0x23349) (BuildId: 1e94beb079e278ac4f2c8bce1f53091548ea1584)
    #7 0x555555577224 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

0x618000000404 is located 4 bytes to the right of 896-byte region [0x618000000080,0x618000000400)
allocated by thread T0 here:
    #0 0x55555562c451 in __interceptor_calloc (/home/fmunozs/fuzz/libredwg/dwgread+0xd8451) (BuildId: c1abb9f7e8ee3d6153ceee2eee78fd254e67b4dc)
    #1 0x7ffff6120a94 in dwg_init_sections /home/fmunozs/fuzz/libredwg/src/dwg.c:3097:26
    #2 0x7ffff60e080c in decode_preR13 /home/fmunozs/fuzz/libredwg/src/decode_r11.c:725:12
    #3 0x7ffff5e8678e in dwg_decode /home/fmunozs/fuzz/libredwg/src/decode.c:213:17
    #4 0x7ffff6109aab in dwg_read_file /home/fmunozs/fuzz/libredwg/src/dwg.c:255:11
    #5 0x555555670e8a in main /home/fmunozs/fuzz/libredwg/programs/dwgread.c
    #6 0x7ffff599528f  (/usr/lib/libc.so.6+0x2328f) (BuildId: 1e94beb079e278ac4f2c8bce1f53091548ea1584)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/fmunozs/fuzz/libredwg/src/decode_r11.c:141:13 in decode_preR13_section_hdr
Shadow bytes around the buggy address:
  0x0c307fff8030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c307fff8080:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff80b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff80c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff80d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
==2306955==ABORTING

```
AddressSanitizer: heap-buffer-overflow libredwg/src/decode_r11.c:141:13 in decode_preR13_section_hdr
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : AddressSanitizer: heap-buffer-overflow libredwg/src/decode_r11.c:141:13 in decode_preR13_section_hdr
Issue date:

--- start body ---
Attached reproduction case, tested against latest git version using ASAN enabled. I noticed two similar reports on the same function but those are already closed as fixed.

[decode_preR13_section_hdr.zip](https://github.com/LibreDWG/libredwg/files/10441807/decode_preR13_section_hdr.zip)

```
./dwgread decode_preR13_section_hdr.dwg 
=================================================================
==2306955==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x618000000404 at pc 0x7ffff60e3888 bp 0x7fffffffc060 sp 0x7fffffffc058
WRITE of size 4 at 0x618000000404 thread T0
    #0 0x7ffff60e3887 in decode_preR13_section_hdr /home/fmunozs/fuzz/libredwg/src/decode_r11.c:141:13
    #1 0x7ffff60e151a in decode_preR13 /home/fmunozs/fuzz/libredwg/src/decode_r11.c:838:11
    #2 0x7ffff5e8678e in dwg_decode /home/fmunozs/fuzz/libredwg/src/decode.c:213:17
    #3 0x7ffff6109aab in dwg_read_file /home/fmunozs/fuzz/libredwg/src/dwg.c:255:11
    #4 0x555555670e8a in main /home/fmunozs/fuzz/libredwg/programs/dwgread.c
    #5 0x7ffff599528f  (/usr/lib/libc.so.6+0x2328f) (BuildId: 1e94beb079e278ac4f2c8bce1f53091548ea1584)
    #6 0x7ffff5995349 in __libc_start_main (/usr/lib/libc.so.6+0x23349) (BuildId: 1e94beb079e278ac4f2c8bce1f53091548ea1584)
    #7 0x555555577224 in _start /build/glibc/src/glibc/csu/../sysdeps/x86_64/start.S:115

0x618000000404 is located 4 bytes to the right of 896-byte region [0x618000000080,0x618000000400)
allocated by thread T0 here:
    #0 0x55555562c451 in __interceptor_calloc (/home/fmunozs/fuzz/libredwg/dwgread+0xd8451) (BuildId: c1abb9f7e8ee3d6153ceee2eee78fd254e67b4dc)
    #1 0x7ffff6120a94 in dwg_init_sections /home/fmunozs/fuzz/libredwg/src/dwg.c:3097:26
    #2 0x7ffff60e080c in decode_preR13 /home/fmunozs/fuzz/libredwg/src/decode_r11.c:725:12
    #3 0x7ffff5e8678e in dwg_decode /home/fmunozs/fuzz/libredwg/src/decode.c:213:17
    #4 0x7ffff6109aab in dwg_read_file /home/fmunozs/fuzz/libredwg/src/dwg.c:255:11
    #5 0x555555670e8a in main /home/fmunozs/fuzz/libredwg/programs/dwgread.c
    #6 0x7ffff599528f  (/usr/lib/libc.so.6+0x2328f) (BuildId: 1e94beb079e278ac4f2c8bce1f53091548ea1584)

SUMMARY: AddressSanitizer: heap-buffer-overflow /home/fmunozs/fuzz/libredwg/src/decode_r11.c:141:13 in decode_preR13_section_hdr
Shadow bytes around the buggy address:
  0x0c307fff8030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x0c307fff8070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c307fff8080:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff8090: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff80a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff80b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff80c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x0c307fff80d0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
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
==2306955==ABORTING

```
--- end body ---
