[4.zip](https://github.com/LibreDWG/libredwg/files/11244876/4.zip)


```

(gdb) r -v9 /home/user/out/default/crashes/4*
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/user/libredwg/dwgread -v9 /home/user/out/default/crashes/4*
Reading DWG file /home/user/out/default/crashes/4.dwg

Program received signal SIGSEGV, Segmentation fault.
0xb6cdc655 in read_2004_compressed_section (dat=<optimized out>, dwg=dwg@entry=0xbfffe578,
    sec_dat=0xbfffe330, type=SECTION_HEADER) at src/decode.c:2018
2018          if (dwg->header.section_info[i].fixedtype == type)
```
Segmentation fault in read_2004_compressed_section
This is a GitHub Issue
repo:libredwg
owner:LibreDWG
Title : Segmentation fault in read_2004_compressed_section
Issue date:

--- start body ---
[4.zip](https://github.com/LibreDWG/libredwg/files/11244876/4.zip)


```

(gdb) r -v9 /home/user/out/default/crashes/4*
The program being debugged has been started already.
Start it from the beginning? (y or n)
Please answer y or n.
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/user/libredwg/dwgread -v9 /home/user/out/default/crashes/4*
Reading DWG file /home/user/out/default/crashes/4.dwg

Program received signal SIGSEGV, Segmentation fault.
0xb6cdc655 in read_2004_compressed_section (dat=<optimized out>, dwg=dwg@entry=0xbfffe578,
    sec_dat=0xbfffe330, type=SECTION_HEADER) at src/decode.c:2018
2018          if (dwg->header.section_info[i].fixedtype == type)
```
--- end body ---

A segmentation fault in the read_2004_compressed_section function of LibreDWG indicates a potential vulnerability that could be exploited to cause a Denial of Service (DoS) by providing a specially crafted DWG file. The crash occurs when the function attempts to access an invalid memory location, which can be triggered by malformed input data.