issue_owner_repo
listlengths 2
2
| issue_body
stringlengths 0
261k
⌀ | issue_title
stringlengths 1
925
| issue_comments_url
stringlengths 56
81
| issue_comments_count
int64 0
2.5k
| issue_created_at
stringlengths 20
20
| issue_updated_at
stringlengths 20
20
| issue_html_url
stringlengths 37
62
| issue_github_id
int64 387k
2.46B
| issue_number
int64 1
127k
|
---|---|---|---|---|---|---|---|---|---|
[
"LibreDWG",
"libredwg"
] |
It appears that `libsanitizer` support is [forced on](https://github.com/LibreDWG/libredwg/blob/master/examples/Makefile.am#L45) even when not supported.
|
ftbfs on platforms without libsanitizer
|
https://api.github.com/repos/LibreDWG/libredwg/issues/330/comments
| 1 |
2021-04-08T03:17:21Z
|
2021-04-25T18:52:40Z
|
https://github.com/LibreDWG/libredwg/issues/330
| 853,017,093 | 330 |
[
"LibreDWG",
"libredwg"
] |
gperf detection. bug added with 0.12.4
|
no bashism in configure
|
https://api.github.com/repos/LibreDWG/libredwg/issues/329/comments
| 0 |
2021-04-07T18:15:41Z
|
2021-04-08T14:07:53Z
|
https://github.com/LibreDWG/libredwg/issues/329
| 852,677,712 | 329 |
[
"LibreDWG",
"libredwg"
] |
I use dwg2svg to export svg,then open it in chrome.There are some misinformation.

|
The exported SVG is wrong
|
https://api.github.com/repos/LibreDWG/libredwg/issues/328/comments
| 2 |
2021-04-07T07:05:54Z
|
2021-04-09T07:34:49Z
|
https://github.com/LibreDWG/libredwg/issues/328
| 852,084,605 | 328 |
[
"LibreDWG",
"libredwg"
] |
I have a dwg drawing and after converting it to dxf, dimensions are not visible in the result (when trying out with both QCAD and LibreCAD:

Same DWG file opened in the online dwgfastview application:

[cellar_plan.zip](https://github.com/LibreDWG/libredwg/files/6264815/cellar_plan.zip)
|
Certain texts are not shown (and other issues) after dwg to dxf conversion
|
https://api.github.com/repos/LibreDWG/libredwg/issues/327/comments
| 2 |
2021-04-06T13:14:02Z
|
2021-04-06T21:53:08Z
|
https://github.com/LibreDWG/libredwg/issues/327
| 851,411,963 | 327 |
[
"LibreDWG",
"libredwg"
] |
Hello,
Trying the attached DWG file with the latest build we get a much worse result. Screenshots are included in the attached zip file.
[TestDWG.zip](https://github.com/LibreDWG/libredwg/files/6081593/TestDWG.zip)
|
Version 12.2 loads this DWG much worse compared to v12.1
|
https://api.github.com/repos/LibreDWG/libredwg/issues/326/comments
| 8 |
2021-03-04T07:47:41Z
|
2021-04-08T14:08:50Z
|
https://github.com/LibreDWG/libredwg/issues/326
| 821,861,776 | 326 |
[
"LibreDWG",
"libredwg"
] |
I found a heap buffer overflow in the current master (8072563).
# Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
# Command
`./dwgread ./poc`
# ASAN report
```
➜ ./dwgread ./poc
ERROR: This version of LibreDWG is only capable of decoding version r13-r2018 (code: AC1012-AC1032) DWG files.
We don't decode many entities and no blocks yet.
ERROR: offset -39
ERROR: offset -85
=================================================================
==12538==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x6120000001c8 at pc 0x7ffff29b78be bp 0x7fffffffa8e0 sp 0x7fffffffa8d0
WRITE of size 8 at 0x6120000001c8 thread T0
#0 0x7ffff29b78bd in decode_preR13_section /home/yuan/afl-target/libredwg-asan/src/decode.c:470
#1 0x7ffff2a26e90 in decode_preR13 /home/yuan/afl-target/libredwg-asan/src/decode.c:744
#2 0x7ffff29a43e9 in dwg_decode /home/yuan/afl-target/libredwg-asan/src/decode.c:235
#3 0x7ffff297afa4 in dwg_read_file /home/yuan/afl-target/libredwg-asan/src/dwg.c:253
#4 0x5555555576f3 in main /home/yuan/afl-target/libredwg-asan/programs/dwgread.c:251
#5 0x7ffff1f52bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#6 0x5555555562a9 in _start (/home/yuan/afl-target/libredwg-asan/programs/.libs/dwgread+0x22a9)
Address 0x6120000001c8 is a wild pointer.
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/yuan/afl-target/libredwg-asan/src/decode.c:470 in decode_preR13_section
Shadow bytes around the buggy address:
0x0c247fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c247fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c247fff8000: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c247fff8010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c247fff8020: 00 00 00 00 00 00 00 00 00 00 00 00 00 fa fa fa
=>0x0c247fff8030: fa fa fa fa fa fa fa fa fa[fa]fa fa fa fa fa fa
0x0c247fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff8050: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff8060: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff8070: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c247fff8080: 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
==12538==ABORTING
```
# POC
[poc.zip](https://github.com/LibreDWG/libredwg/files/6080842/poc.zip)
|
Heap-buffer-overflow in decode_preR13 line 470
|
https://api.github.com/repos/LibreDWG/libredwg/issues/325/comments
| 2 |
2021-03-04T04:20:26Z
|
2021-03-08T09:50:24Z
|
https://github.com/LibreDWG/libredwg/issues/325
| 821,736,833 | 325 |
[
"LibreDWG",
"libredwg"
] |
I found four NULL dereference bugs in the current master (5d2c75f).
# Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
# bug 1 in out_dxfb.c:1902
## Command
`./dwg2dxf -o ./fuzz_out -b -y ./poc1`
## ASAN report
```
➜ ./dwg2dxf -o ./fuzz_out -b -y ./poc1
Reading DWG file ./poc1
Warning: checksum: 0x27c51243 (calculated) mismatch
ERROR: Skip section AcDb:FileDepList with size 8 > 0 * 128
ERROR: obj_string_stream overflow, bitsize 96 => 96
ERROR: Invalid object handle 10.1.1 at pos @4.2
ERROR: bit_read_RC buffer overflow at 12
ERROR: bit_read_RC buffer overflow at 12
ERROR: bit_read_RC buffer overflow at 12
ERROR: bit_read_RC buffer overflow at 12 >= 12
ERROR: bit_read_BL: unexpected 2-bit code: '11'
ERROR: bit_read_RC buffer overflow at 12
ERROR: Invalid CMC method 0x0 ignored
ERROR: bit_advance_position buffer overflow at pos 11.7, size 12, advance by 2
ERROR: bit_read_BD buffer overflow at 12 >= 12
ERROR: Invalid BD identifier_height
Warning: check_CRC mismatch 22-38 = 16: 401C <=> 0B9D
Warning: Unstable Class object 502 TABLESTYLE (0xfff) 42/0
Warning: TODO TABLESTYLE r2010+ missing fields
Warning: Unstable Class object 503 MATERIAL (0x481) 45/0
Warning: Unstable Class object 503 MATERIAL (0x481) 46/0
Warning: Unstable Class object 503 MATERIAL (0x481) 47/0
Warning: Ignore invalid handleoff (@390)
ERROR: bit_read_RC buffer overflow at 174
ERROR: bit_read_RC buffer overflow at 171
ERROR: bit_read_RC buffer overflow at 973
ERROR: bit_read_RC buffer overflow at 284
ERROR: bit_read_RC buffer overflow at 284
ERROR: Some section size or address out of bounds
ERROR: Failed to read uncompressed Preview section
Warning: Skip empty section 0 AcDb:Template
ERROR: Template section not found
ERROR: Invalid num_segidx
Warning: Object handle not found, 2/2 in 150 objects
Warning: Object handle not found, 2/2 in 150 objects
Warning: Object handle not found, 2/2 in 150 objects
Writing DXF file ./fuzz_out as r14
ASAN:DEADLYSIGNAL
=================================================================
==17991==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000038 (pc 0x7ffff4cf2b1b bp 0x7fffffffc9c0 sp 0x7fffffff8450 T0)
==17991==The signal is caused by a READ memory access.
==17991==Hint: address points to the zero page.
#0 0x7ffff4cf2b1a in dxfb_tables_write /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:1902
#1 0x7ffff4d06d16 in dwg_write_dxfb /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:2312
#2 0x5555555589a1 in main /home/yuan/afl-target/libredwg-asan/programs/dwg2dxf.c:336
#3 0x7ffff1e6bbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#4 0x555555556a89 in _start (/home/yuan/afl-target/libredwg-asan/programs/.libs/dwg2dxf+0x2a89)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:1902 in dxfb_tables_write
==17991==ABORTING
```
# bug 2 in out_dxfb.c:1924
## Command
`./dwg2dxf -o ./fuzz_out -b -y ./poc2`
## ASAN report
```
➜ ./dwg2dxf -o ./fuzz_out -b -y ./poc2
Reading DWG file ./poc2
Warning: checksum: 0x27c51243 (calculated) mismatch
ERROR: Skip section AcDb:FileDepList with size 8 > 0 * 128
ERROR: obj_string_stream overflow, bitsize 4294965675 => 88
ERROR: Invalid EED size 8770 > 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_advance_position buffer overflow at pos 10.7, size 11, advance by 2
ERROR: bit_read_BB buffer overflow at 11 >= 11
ERROR: bit_read_BD buffer overflow at 11 >= 11
ERROR: bit_read_B buffer overflow at 11 >= 11
ERROR: bit_read_BB buffer overflow at 11 >= 11
ERROR: bit_read_BD buffer overflow at 11 >= 11
ERROR: bit_read_RC buffer overflow at 11 >= 11
ERROR: bit_read_RD buffer overflow at 11 >= 11
ERROR: Invalid RD oblique_angle
Warning: check_CRC mismatch 39-54 = 15: C16F <=> 0D90
Warning: Unstable Class object 502 TABLESTYLE (0xfff) 42/0
Warning: TODO TABLESTYLE r2010+ missing fields
Warning: Unstable Class object 503 MATERIAL (0x481) 45/0
Warning: Unstable Class object 503 MATERIAL (0x481) 46/0
Warning: Unstable Class object 503 MATERIAL (0x481) 47/0
Warning: Ignore invalid handleoff (@390)
ERROR: bit_read_RC buffer overflow at 174
ERROR: bit_read_RC buffer overflow at 171
ERROR: bit_read_RC buffer overflow at 973
ERROR: bit_read_RC buffer overflow at 284
ERROR: bit_read_RC buffer overflow at 284
ERROR: Some section size or address out of bounds
ERROR: Failed to read uncompressed Preview section
Warning: Skip empty section 0 AcDb:Template
ERROR: Template section not found
ERROR: Invalid num_segidx
Warning: Object handle not found, 3/3 in 150 objects
Warning: Object handle not found, 3/3 in 150 objects
Warning: Object handle not found, 3/3 in 150 objects
Writing DXF file ./fuzz_out
ERROR: Unhandled VALUE_INT code 0
ASAN:DEADLYSIGNAL
=================================================================
==18068==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000038 (pc 0x7ffff4cf4e7f bp 0x7fffffffc9e0 sp 0x7fffffff8470 T0)
==18068==The signal is caused by a READ memory access.
==18068==Hint: address points to the zero page.
#0 0x7ffff4cf4e7e in dxfb_tables_write /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:1924
#1 0x7ffff4d06d16 in dwg_write_dxfb /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:2312
#2 0x5555555589a1 in main /home/yuan/afl-target/libredwg-asan/programs/dwg2dxf.c:336
#3 0x7ffff1e6bbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#4 0x555555556a89 in _start (/home/yuan/afl-target/libredwg-asan/programs/.libs/dwg2dxf+0x2a89)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:1924 in dxfb_tables_write
==18068==ABORTING
```
# bug 3 in out_dxfb.c:1872
## Command
`./dwg2dxf -o ./fuzz_out -b -y poc3`
## ASAN report
```
➜ ./dwg2dxf -o ./fuzz_out -b -y poc3
Reading DWG file poc3
Warning: checksum: 0x27c51243 (calculated) mismatch
ERROR: Skip section AcDb:FileDepList with size 8 > 0 * 128
ERROR: Invalid preview size 18496. Need min. 18496 bits for TF, have 76 for RAY.
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_RC buffer overflow at 13
ERROR: bit_read_BD buffer overflow at 13 >= 13
ERROR: bit_read_BB buffer overflow at 13 >= 13
ERROR: bit_read_BD buffer overflow at 13 >= 13
ERROR: bit_read_BB buffer overflow at 13 >= 13
ERROR: bit_read_BD buffer overflow at 13 >= 13
ERROR: Invalid 3BD vector
Warning: check_CRC mismatch 55-71 = 16: 1ECF <=> 9AC1
Warning: Unstable Class object 502 TABLESTYLE (0xfff) 42/0
Warning: TODO TABLESTYLE r2010+ missing fields
Warning: Unstable Class object 503 MATERIAL (0x481) 45/0
Warning: Unstable Class object 503 MATERIAL (0x481) 46/0
Warning: Unstable Class object 503 MATERIAL (0x481) 47/0
Warning: Ignore invalid handleoff (@390)
ERROR: bit_read_RC buffer overflow at 174
ERROR: bit_read_RC buffer overflow at 171
ERROR: bit_read_RC buffer overflow at 973
ERROR: bit_read_RC buffer overflow at 284
ERROR: bit_read_RC buffer overflow at 284
ERROR: Some section size or address out of bounds
ERROR: Failed to read uncompressed Preview section
Warning: Skip empty section 0 AcDb:Template
ERROR: Template section not found
ERROR: Invalid num_segidx
Writing DXF file ./fuzz_out
ASAN:DEADLYSIGNAL
=================================================================
==18124==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000038 (pc 0x7ffff4cf068d bp 0x7fffffffc9e0 sp 0x7fffffff8470 T0)
==18124==The signal is caused by a READ memory access.
==18124==Hint: address points to the zero page.
#0 0x7ffff4cf068c in dxfb_tables_write /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:1872
#1 0x7ffff4d06d16 in dwg_write_dxfb /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:2312
#2 0x5555555589a1 in main /home/yuan/afl-target/libredwg-asan/programs/dwg2dxf.c:336
#3 0x7ffff1e6bbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#4 0x555555556a89 in _start (/home/yuan/afl-target/libredwg-asan/programs/.libs/dwg2dxf+0x2a89)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:1872 in dxfb_tables_write
==18124==ABORTING
```
# bug 4 in out_dxfb.c:1944
## Command
`./dwg2dxf -o ./fuzz_out -b -y --as r12 poc4`
## ASAN report
```
➜ ./dwg2dxf -o ./fuzz_out -b -y --as r12 poc4
Reading DWG file poc4
Warning: checksum: 0x27c51243 (calculated) mismatch
ERROR: Skip section AcDb:FileDepList with size 8 > 0 * 128
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_RC buffer overflow at 6
ERROR: bit_read_BD buffer overflow at 6 >= 6
ERROR: bit_read_BB buffer overflow at 6 >= 6
ERROR: bit_read_BD buffer overflow at 6 >= 6
ERROR: bit_read_BB buffer overflow at 6 >= 6
ERROR: bit_read_BD buffer overflow at 6 >= 6
ERROR: Invalid 3BD view_target
Warning: check_CRC mismatch 73-82 = 9: 89F5 <=> 46F4
Warning: Unstable Class object 502 TABLESTYLE (0xfff) 42/0
Warning: TODO TABLESTYLE r2010+ missing fields
Warning: Unstable Class object 503 MATERIAL (0x481) 45/0
Warning: Unstable Class object 503 MATERIAL (0x481) 46/0
Warning: Unstable Class object 503 MATERIAL (0x481) 47/0
Warning: Ignore invalid handleoff (@390)
ERROR: bit_read_RC buffer overflow at 174
ERROR: bit_read_RC buffer overflow at 171
ERROR: bit_read_RC buffer overflow at 973
ERROR: bit_read_RC buffer overflow at 284
ERROR: bit_read_RC buffer overflow at 284
ERROR: Some section size or address out of bounds
ERROR: Failed to read uncompressed Preview section
Warning: Skip empty section 0 AcDb:Template
ERROR: Template section not found
ERROR: Invalid num_segidx
Writing DXF file ./fuzz_out as r12
ERROR: Unhandled VALUE_INT code 7
ASAN:DEADLYSIGNAL
=================================================================
==18183==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000038 (pc 0x7ffff4cf71e3 bp 0x7fffffffc9c0 sp 0x7fffffff8450 T0)
==18183==The signal is caused by a READ memory access.
==18183==Hint: address points to the zero page.
#0 0x7ffff4cf71e2 in dxfb_tables_write /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:1944
#1 0x7ffff4d06d16 in dwg_write_dxfb /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:2312
#2 0x5555555589a1 in main /home/yuan/afl-target/libredwg-asan/programs/dwg2dxf.c:336
#3 0x7ffff1e6bbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#4 0x555555556a89 in _start (/home/yuan/afl-target/libredwg-asan/programs/.libs/dwg2dxf+0x2a89)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/yuan/afl-target/libredwg-asan/src/out_dxfb.c:1944 in dxfb_tables_write
==18183==ABORTING
```
# All poc
[poc.zip](https://github.com/LibreDWG/libredwg/files/6074852/poc.zip)
|
Four NULL dereference in out_dxfb.c
|
https://api.github.com/repos/LibreDWG/libredwg/issues/324/comments
| 1 |
2021-03-03T09:19:26Z
|
2021-03-03T17:02:46Z
|
https://github.com/LibreDWG/libredwg/issues/324
| 820,916,089 | 324 |
[
"LibreDWG",
"libredwg"
] |
I found a invalid read in the current master (7f525b9).
# Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
# Command
`./dwgbmp ./poc2 /dev/null`
# ASAN report
```
➜ ./dwgbmp ./poc2 /dev/null
ASAN:DEADLYSIGNAL
=================================================================
==17204==ERROR: AddressSanitizer: SEGV on unknown address 0x620022003814 (pc 0x7ffff1fd1b3f bp 0x000000000070 sp 0x7fffffffcb48 T0)
==17204==The signal is caused by a READ memory access.
#0 0x7ffff1fd1b3e (/lib/x86_64-linux-gnu/libc.so.6+0x18eb3e)
#1 0x7ffff1ecea63 in _IO_file_xsputn (/lib/x86_64-linux-gnu/libc.so.6+0x8ba63)
#2 0x7ffff1ec2a56 in _IO_fwrite (/lib/x86_64-linux-gnu/libc.so.6+0x7fa56)
#3 0x5555555576f0 in get_bmp /home/yuan/afl-target/libredwg-test/programs/dwgbmp.c:182
#4 0x5555555580c2 in main /home/yuan/afl-target/libredwg-test/programs/dwgbmp.c:301
#5 0x7ffff1e64bf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#6 0x5555555561b9 in _start (/home/yuan/afl-target/libredwg-test/programs/.libs/dwgbmp+0x21b9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib/x86_64-linux-gnu/libc.so.6+0x18eb3e)
==17204==ABORTING
```
# POC
[poc2.zip](https://github.com/LibreDWG/libredwg/files/6074531/poc2.zip)
|
READ unknown address in dwgbmp.c:182
|
https://api.github.com/repos/LibreDWG/libredwg/issues/323/comments
| 0 |
2021-03-03T08:26:30Z
|
2021-03-03T17:02:58Z
|
https://github.com/LibreDWG/libredwg/issues/323
| 820,875,291 | 323 |
[
"LibreDWG",
"libredwg"
] |
I've made the simplest DWG containing only one circle and I still get the Recovery Mode when opening it in AutoCAD 2007. From what I can see, LibreDWG is unable to write accurate DWG files, in all cases.
I'm attaching the files, just in case I am missing something. I don't believe that these warnings are meaningful in this respect.


[files.zip](https://github.com/LibreDWG/libredwg/files/6066834/files.zip)
|
Cannot get rid of AutoCAD recovery mode
|
https://api.github.com/repos/LibreDWG/libredwg/issues/322/comments
| 25 |
2021-03-02T07:28:52Z
|
2023-06-22T06:15:39Z
|
https://github.com/LibreDWG/libredwg/issues/322
| 819,727,435 | 322 |
[
"LibreDWG",
"libredwg"
] |
I found a NULL dereference in the current master (7f525b9).
# Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
# Command
`./dwg2dxf -o /dev/null -m -y ./poc1`
# ASAN report
```
➜ ./dwg2dxf -o /dev/null -m -y ./poc1
Reading DWG file ./poc1
ERROR: bit_read_fixed buffer overflow at pos 128, size 152
ERROR: read_file_header Invalid file_header->header_size 9223091660467011385 > MAX_SIZE
ERROR: read_file_header Invalid file_header->file_size 65362 > MAX_SIZE
ERROR: read_file_header Invalid file_header->pages_maxid 9218588057970734863 > MAX_COUNT
ERROR: read_file_header Invalid file_header->pages_amount 1095652868096 > MAX_COUNT
ERROR: read_file_header Invalid file_header->num_sections 9177492712645984768 > MAX_COUNT
Writing DXF file /dev/null
ASAN:DEADLYSIGNAL
=================================================================
==10341==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x7ffff3c883cf bp 0x7fffffffcac0 sp 0x7fffffffc1c0 T0)
==10341==The signal is caused by a READ memory access.
==10341==Hint: address points to the zero page.
#0 0x7ffff3c883ce in dxf_header_write /home/yuan/afl-target/libredwg-test/src/header_variables_dxf.spec:26
#1 0x7ffff3cbfc7e in dwg_write_dxf /home/yuan/afl-target/libredwg-test/src/out_dxf.c:3621
#2 0x5555555589bc in main /home/yuan/afl-target/libredwg-test/programs/dwg2dxf.c:336
#3 0x7ffff1e6bbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#4 0x555555556a89 in _start (/home/yuan/afl-target/libredwg-test/programs/.libs/dwg2dxf+0x2a89)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/yuan/afl-target/libredwg-test/src/header_variables_dxf.spec:26 in dxf_header_write
==10341==ABORTING
```
# POC
[poc1.zip](https://github.com/LibreDWG/libredwg/files/6066295/poc1.zip)
|
NULL dereference in header_variables_dxf.spec:26
|
https://api.github.com/repos/LibreDWG/libredwg/issues/321/comments
| 9 |
2021-03-02T05:15:05Z
|
2021-03-10T16:57:03Z
|
https://github.com/LibreDWG/libredwg/issues/321
| 819,631,703 | 321 |
[
"LibreDWG",
"libredwg"
] |
I found a heap buffer overflow in the current master (7f525b9).
# Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
# Command
`./dwgbmp ~/poc /dev/null`
# ASAN report
```
➜ ./dwgbmp ~/poc /dev/null
=================================================================
==25618==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62c0000301ff at pc 0x7ffff6e91733 bp 0x7fffffffbde0 sp 0x7fffffffb588
READ of size 6 at 0x62c0000301ff thread T0
#0 0x7ffff6e91732 (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x79732)
#1 0x7ffff28b0184 in bit_read_fixed /home/yuan/afl-target/libredwg-test/src/bits.c:1429
#2 0x7ffff299426c in acds_private /home/yuan/afl-target/libredwg-test/src/acds.spec:123
#3 0x7ffff29b2979 in read_2004_section_acds /home/yuan/afl-target/libredwg-test/src/decode.c:3505
#4 0x7ffff29c3596 in decode_R2004 /home/yuan/afl-target/libredwg-test/src/decode.c:3769
#5 0x7ffff28bd6bb in dwg_decode /home/yuan/afl-target/libredwg-test/src/decode.c:245
#6 0x7ffff2894184 in dwg_read_file /home/yuan/afl-target/libredwg-test/src/dwg.c:253
#7 0x5555555570bc in get_bmp /home/yuan/afl-target/libredwg-test/programs/dwgbmp.c:120
#8 0x5555555580c2 in main /home/yuan/afl-target/libredwg-test/programs/dwgbmp.c:301
#9 0x7ffff1e6bbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
#10 0x5555555561b9 in _start (/home/yuan/afl-target/libredwg-test/programs/.libs/dwgbmp+0x21b9)
0x62c0000301ff is located 1 bytes to the left of 29696-byte region [0x62c000030200,0x62c000037600)
allocated by thread T0 here:
#0 0x7ffff6ef6d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
#1 0x7ffff2963745 in read_2004_compressed_section /home/yuan/afl-target/libredwg-test/src/decode.c:2492
#2 0x7ffff29b2504 in read_2004_section_acds /home/yuan/afl-target/libredwg-test/src/decode.c:3491
#3 0x7ffff29c3596 in decode_R2004 /home/yuan/afl-target/libredwg-test/src/decode.c:3769
#4 0x7ffff28bd6bb in dwg_decode /home/yuan/afl-target/libredwg-test/src/decode.c:245
#5 0x7ffff2894184 in dwg_read_file /home/yuan/afl-target/libredwg-test/src/dwg.c:253
#6 0x5555555570bc in get_bmp /home/yuan/afl-target/libredwg-test/programs/dwgbmp.c:120
#7 0x5555555580c2 in main /home/yuan/afl-target/libredwg-test/programs/dwgbmp.c:301
#8 0x7ffff1e6bbf6 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf6)
SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x79732)
Shadow bytes around the buggy address:
0x0c587fffdfe0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c587fffdff0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c587fffe000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c587fffe010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c587fffe020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c587fffe030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa[fa]
0x0c587fffe040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c587fffe050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c587fffe060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c587fffe070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c587fffe080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
==25618==ABORTING
```
# POC
[poc.zip](https://github.com/LibreDWG/libredwg/files/6066256/poc.zip)
|
Heap-buffer-overflow in bits.c:1429
|
https://api.github.com/repos/LibreDWG/libredwg/issues/320/comments
| 1 |
2021-03-02T05:04:20Z
|
2021-03-03T10:35:15Z
|
https://github.com/LibreDWG/libredwg/issues/320
| 819,620,849 | 320 |
[
"LibreDWG",
"libredwg"
] |
in `dwgadd.c` line `650`, the code is wrong? should use `dwg_paper_space_object` fuction?
```C
if (sscanf (p, "pspace"))
{
// wrong?
Dwg_Object *pspace = dwg_model_space_object (dwg);
hdr = pspace->tio.object->tio.BLOCK_HEADER;
}
else if (sscanf (p, "mspace"))
{
hdr = mspace->tio.object->tio.BLOCK_HEADER;
}
```
|
In "dwgadd.c", it is wrong for get the "pspace"?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/319/comments
| 1 |
2021-02-26T15:43:17Z
|
2021-02-28T07:42:22Z
|
https://github.com/LibreDWG/libredwg/issues/319
| 817,459,864 | 319 |
[
"LibreDWG",
"libredwg"
] |
Hello everyone,
Thanks for the work on this very promising library.
I encountered some errors on reading (using dwgread) proprietary files I can't share (I'm working on a minimal reproducing sample that could be shared eventually) but I get similar errors while trying to read the sample DWG files provided by Autocad, that you can find here:
https://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autocad-sample-files.html
I think these would be a great target to be able to read, as they seem to be quite popular and widely used as teaching examples, and would be a good addition to your tests.
I've tried a few, I can confirm that `civil_example-imperial.dwg` doesn't work, and I'm sure there are others.
Cheers, thanks again, and good luck!
|
AutoCAD r2010 samples with wrong string hi_size offset
|
https://api.github.com/repos/LibreDWG/libredwg/issues/318/comments
| 2 |
2021-02-24T16:56:54Z
|
2021-02-26T19:10:40Z
|
https://github.com/LibreDWG/libredwg/issues/318
| 815,666,431 | 318 |
[
"LibreDWG",
"libredwg"
] |
See PR #316
|
Add honggfuzz and LLVM libfuzzer integration to examples/dwgfuzz
|
https://api.github.com/repos/LibreDWG/libredwg/issues/317/comments
| 2 |
2021-02-22T19:30:52Z
|
2021-02-25T08:22:17Z
|
https://github.com/LibreDWG/libredwg/issues/317
| 813,796,831 | 317 |
[
"LibreDWG",
"libredwg"
] |
`./json bigPlan_2000.dwg`
without any error
`./dwg bigPlan_2000.json`
several bit_write_CRC buffer overflow errors
import into AutoCAD crashes
by timoria
|
bit_write_CRC buffer overflow with bigPlan_2000.dwg
|
https://api.github.com/repos/LibreDWG/libredwg/issues/315/comments
| 3 |
2021-02-22T09:47:03Z
|
2021-02-22T19:10:31Z
|
https://github.com/LibreDWG/libredwg/issues/315
| 813,330,537 | 315 |
[
"LibreDWG",
"libredwg"
] |
Dear @rurban ,
I saw the last request for dwg 2018 support, however I'm still not sure if it is possible to rewrite let's say from dwg 2004 format to 2018 one?
If 2018 rewrite is supported and only the issue with help https://github.com/LibreDWG/libredwg/blob/master/programs/dwgwrite.c#L62
I will be appreciated if you let me know.
Best regards
|
Support rewrite for DWG 2018 files
|
https://api.github.com/repos/LibreDWG/libredwg/issues/314/comments
| 1 |
2021-02-19T21:12:46Z
|
2021-02-28T15:37:50Z
|
https://github.com/LibreDWG/libredwg/issues/314
| 812,353,529 | 314 |
[
"LibreDWG",
"libredwg"
] |
Hi
I tried to dwg2dxf a 2018 dwg format.
The output dxf does not open correctly (it does not open at all and seems to be "corrupted" somehow)
As I saw in the documentation the library currently support only few of R2010+
Do you think that 2018+ will be available soon ?
If you want to try this file here is a [link](https://drive.google.com/drive/folders/1NRqt1OARxFYXFybML1uv7Ze1f6ElHc-O?usp=sharing) the file is called 2018_3.dwg
|
Support for DWG R2018 ?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/313/comments
| 4 |
2021-02-09T15:50:28Z
|
2021-02-22T09:39:49Z
|
https://github.com/LibreDWG/libredwg/issues/313
| 804,676,344 | 313 |
[
"LibreDWG",
"libredwg"
] |
Hi~
For Text entity, if the font name is Arial or others that is plain ASCII, we can get the correct font_file. But when Text entity use Chinese font with Chinese font name like “黑体” or "宋体"( btw, their .ttf file names are plain English), it returns null font _file. See the example file attached.
```
Dwg_Entity_TEXT *text;
text = dwg.object[i].tio.entity->tio.TEXT;
Dwg_Object_STYLE *style = text->style->obj->tio.object->tio.STYLE;
char *stylename;
stylename = bit_convert_TU((BITCODE_TU)style->font_file);
```
Could you help check if the issue can be solved?
Thank you~~
[Text.zip](https://github.com/LibreDWG/libredwg/files/5934216/Text.zip)
|
font_file is null When the TEXT font name is not plain ASCII
|
https://api.github.com/repos/LibreDWG/libredwg/issues/312/comments
| 1 |
2021-02-05T17:32:17Z
|
2023-12-15T07:57:22Z
|
https://github.com/LibreDWG/libredwg/issues/312
| 802,346,568 | 312 |
[
"LibreDWG",
"libredwg"
] |
dwg2dxf conversion (Windows)
if the filename is test.dwg, the output will be test.dxf
if the filename is test.DWG (ext. uppercase) the output will be test.DWG.dxf
|
dwg2dxf uppercase extension problem
|
https://api.github.com/repos/LibreDWG/libredwg/issues/311/comments
| 2 |
2021-02-05T12:45:32Z
|
2021-02-26T06:37:30Z
|
https://github.com/LibreDWG/libredwg/issues/311
| 802,136,232 | 311 |
[
"LibreDWG",
"libredwg"
] |
Hi,
Glad to try the libredwg lib and thank you so much for your work.
I hava tried some dwg files and it works fine. But when I use this dwg file I attached with only two LINE entites, I got some wrong data. The layer object of LINE entity is null, and also the start and end point of Line entities in this dwg file is not correct, very very strange coordinates values,like [ -3.77695079567220847e+165, -2.9177506778545462e+168, 0.0 ], [ 0.0, -2.86035487996884257e+168, 0.0 ] . Code below:
Dwg_Object *ms = dwg_model_space_object (&dwg);
obj = get_first_owned_entity (ms);
while (obj)
{
if(obj->type == DWG_TYPE_LINE)
{
Dwg_Object_LAYER * dwgLayerobj =dwg_get_entity_layer(obj->tio.entity);
Dwg_Entity_LINE *line = obj->tio.entity->tio.LINE;
}
}
The dwgLayerobj is null ,and the line entity also get wrong start or end coordinate.
Could you help to check if this issue can be solved? I can open it correctly in AutoCAD or Microstation, so I think the file is ok. But I have tried other dwg files by the lib, I can get the correct values of LINE entities.
Thank you~~
[d12007.zip](https://github.com/LibreDWG/libredwg/files/5889282/d12007.zip)
|
Wrong EED code 3 layer handles, causing LINE entity with null layer and wrong start or end point coordinates
|
https://api.github.com/repos/LibreDWG/libredwg/issues/310/comments
| 3 |
2021-01-28T18:21:21Z
|
2021-01-31T15:11:34Z
|
https://github.com/LibreDWG/libredwg/issues/310
| 796,242,722 | 310 |
[
"LibreDWG",
"libredwg"
] |
See #304
|
null-deref in encode find_class in malcrafted DWG's
|
https://api.github.com/repos/LibreDWG/libredwg/issues/309/comments
| 0 |
2021-01-17T10:18:27Z
|
2021-01-31T15:11:33Z
|
https://github.com/LibreDWG/libredwg/issues/309
| 787,674,361 | 309 |
[
"LibreDWG",
"libredwg"
] |
layers may not be empty in normal DWG's, but you can prepare broken DWG's
See #304
|
null-deref in dwglayers with empty layer name in malcrafted DWG's
|
https://api.github.com/repos/LibreDWG/libredwg/issues/308/comments
| 0 |
2021-01-17T10:02:16Z
|
2021-01-31T15:11:33Z
|
https://github.com/LibreDWG/libredwg/issues/308
| 787,671,849 | 308 |
[
"LibreDWG",
"libredwg"
] |
See #304
|
null-deref in decode eed in malcrafted DWG's
|
https://api.github.com/repos/LibreDWG/libredwg/issues/307/comments
| 0 |
2021-01-17T09:58:49Z
|
2021-01-31T15:11:33Z
|
https://github.com/LibreDWG/libredwg/issues/307
| 787,671,341 | 307 |
[
"LibreDWG",
"libredwg"
] |
See #304
|
error in out_json of corrupted 3DSOLID data in malcrafted DWGs
|
https://api.github.com/repos/LibreDWG/libredwg/issues/306/comments
| 0 |
2021-01-17T09:55:46Z
|
2021-01-31T15:11:32Z
|
https://github.com/LibreDWG/libredwg/issues/306
| 787,670,877 | 306 |
[
"LibreDWG",
"libredwg"
] |
See #304
|
error in dwg2SVG of corrupted BLOCKS in malcrafted DWGs
|
https://api.github.com/repos/LibreDWG/libredwg/issues/305/comments
| 0 |
2021-01-17T09:54:47Z
|
2021-01-31T15:11:32Z
|
https://github.com/LibreDWG/libredwg/issues/305
| 787,670,734 | 305 |
[
"LibreDWG",
"libredwg"
] |
heap overflows, invalid free and null-rederefs in decode of invalid 3DSOLIDs in malcrafted DWG's.
Possibly security relevant. CVE's forthcoming, will be fixed in 0.12.1
|
fuzzer crashes by #CHEW KIN ZHONG#
|
https://api.github.com/repos/LibreDWG/libredwg/issues/304/comments
| 1 |
2021-01-16T11:04:07Z
|
2021-07-03T14:52:55Z
|
https://github.com/LibreDWG/libredwg/issues/304
| 787,442,717 | 304 |
[
"LibreDWG",
"libredwg"
] |
`dwgread` works on AC1027
fails on AC1032 to read anything. it gives an empty result.
Is this expected?
|
dwgread on AC1032 files results in empty file
|
https://api.github.com/repos/LibreDWG/libredwg/issues/303/comments
| 5 |
2021-01-09T21:48:13Z
|
2021-01-15T00:06:39Z
|
https://github.com/LibreDWG/libredwg/issues/303
| 782,691,217 | 303 |
[
"LibreDWG",
"libredwg"
] |
same as with POLYLINE and VERTEX.
The 3 UNDERLAY's have seperate classes at least. See `src/objects.in` in `smoke/add`
Provide the common struct as dwg_abstractentity_UNDERLAY and typedef them to Dwg_Entity_PDFUNDERLAY, ...
In the spec do it with macros, not functions yet.
Branch `work/gh302-split`
|
split up UNDERLAY, UNDERLAYDEF and BACKGROUND objects
|
https://api.github.com/repos/LibreDWG/libredwg/issues/302/comments
| 0 |
2020-12-18T18:59:20Z
|
2020-12-23T18:31:04Z
|
https://github.com/LibreDWG/libredwg/issues/302
| 771,103,589 | 302 |
[
"LibreDWG",
"libredwg"
] |
Such high-level API's need to abstract away unicode vs Latin codepage issues. Only accept UTF-8 and convert internally.
Such as in the dynapi, where we only handle UTF-8.
|
Only UTF-8 encoding for the add API (as with dynapi)
|
https://api.github.com/repos/LibreDWG/libredwg/issues/300/comments
| 1 |
2020-12-07T09:21:44Z
|
2020-12-23T18:31:04Z
|
https://github.com/LibreDWG/libredwg/issues/300
| 758,329,277 | 300 |
[
"LibreDWG",
"libredwg"
] |
-DLIBREDWG_LIBONLY=On (no progs)
-DLIBREDWG_DISABLE_WRITE=On
-DLIBREDWG_DISABLE_JSON=On
Esp. for SolveSpace
Need to find out how to pass such options to
`add_subdirectory(extlib/libredwg)` *(I did)*
|
Support slimmer cmake builds
|
https://api.github.com/repos/LibreDWG/libredwg/issues/299/comments
| 1 |
2020-12-01T07:59:11Z
|
2020-12-02T06:39:34Z
|
https://github.com/LibreDWG/libredwg/issues/299
| 754,150,681 | 299 |
[
"LibreDWG",
"libredwg"
] |
The github actions smokers fail with that (ubuntu, macos). And `pip install {--user,} libxml2` doesnt help.
Only needed for `test/xmlsuite`, so skip that.
|
probe for python libxml2
|
https://api.github.com/repos/LibreDWG/libredwg/issues/298/comments
| 1 |
2020-12-01T07:37:30Z
|
2020-12-02T06:41:02Z
|
https://github.com/LibreDWG/libredwg/issues/298
| 754,126,233 | 298 |
[
"LibreDWG",
"libredwg"
] |
Hi,
in dwgread appear -nan
{
"object": "MATERIAL",
"index": 114,
"type": 506,
"handle": [0, 617],
"size": 59,
"bitsize": 402,
"ownerhandle": [12, 2, 511, 106],
"reactors": [
[4, 1, 106, 106]
],
"xdicobjhandle": [3, 2, 618, 618],
"_subclass": "AcDbMaterial",
"name": "ByLayer",
"description": "",
"ambient_color.flag": 0,
"ambient_color.factor": 0.0,
"diffuse_color.flag": 0,
"diffuse_color.factor": 0.0,
"diffusemap.blendfactor": 0.0,
"diffusemap.projection": 0,
"diffusemap.tiling": 0,
"diffusemap.autotransform": 0,
"diffusemap.transmatrix": [
0.00000000000000,
-0.00000000000000,
0.00000000000000,
-nan,
-nan,
-nan,
-nan,
-nan,
-nan,
-nan,
-nan,
-nan,
-nan,
-nan,
-nan,
-nan
],
"diffusemap.source": 0,
"specular_color.flag": 0,
"specular_color.factor": -nan,
"specularmap.blendfactor": 0.0,
"specularmap.projection": 0,
"specularmap.tiling": 0,
"specularmap.autotransform": 0,
"specularmap.transmatrix": [
],
"specularmap.source": 0,
"specular_gloss_factor": 0.0,
"reflectionmap.blendfactor": 0.0,
"reflectionmap.projection": 0,
"reflectionmap.tiling": 0,
"reflectionmap.autotransform": 0,
"reflectionmap.transmatrix": [
],
"reflectionmap.source": 0,
"opacity_percent": 0.0,
"opacitymap.blendfactor": 0.0,
"opacitymap.projection": 0,
"opacitymap.tiling": 0,
"opacitymap.autotransform": 0,
"opacitymap.transmatrix": [
],
"opacitymap.source": 0,
"bumpmap.blendfactor": 0.0,
"bumpmap.projection": 0,
"bumpmap.tiling": 0,
"bumpmap.autotransform": 0,
"bumpmap.transmatrix": [
],
"bumpmap.source": 0,
"refraction_index": 0.0,
"refractionmap.blendfactor": 0.0,
"refractionmap.projection": 0,
"refractionmap.tiling": 0,
"refractionmap.autotransform": 0,
"refractionmap.transmatrix": [
],
"refractionmap.source": 0
},
|
dwgread -nan value in object: MATERIAL that is correct?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/297/comments
| 3 |
2020-11-16T21:33:11Z
|
2020-11-17T09:19:06Z
|
https://github.com/LibreDWG/libredwg/issues/297
| 744,205,727 | 297 |
[
"LibreDWG",
"libredwg"
] |
Hi, Reini.
We use the tool dwg2json, is great to import dwg files in GauchoCAD. We miss some dxf2json in order to import DXF also.
¿Is planed dxf2json?
Regards.
|
dxf2json (similar way as dwg2json)
|
https://api.github.com/repos/LibreDWG/libredwg/issues/296/comments
| 3 |
2020-11-16T19:47:08Z
|
2020-11-17T09:22:56Z
|
https://github.com/LibreDWG/libredwg/issues/296
| 744,123,091 | 296 |
[
"LibreDWG",
"libredwg"
] |
otherwise user-changed subclasses can overwrite the heap. A changed subclass can be smaller or bigger than the correct subclass. The importers just write to a value offset, without checking if the subclass is actually valid.
We need to check if a subclass belongs to a class, or which subclasses are valid in a class.
Parse dwg.spec for all SUBCLASSes and fill in a new dwg_name_subclasses[] array, sorted for bsearch.
|
Importers need a has_subclasss check
|
https://api.github.com/repos/LibreDWG/libredwg/issues/295/comments
| 0 |
2020-11-16T13:19:06Z
|
2020-11-16T16:52:50Z
|
https://github.com/LibreDWG/libredwg/issues/295
| 743,830,549 | 295 |
[
"LibreDWG",
"libredwg"
] |
but Teigha can read them correctly. the names show up garbled.
not ok:
elev1_from_autocad_r14_r13c3, elev2_from_autocad_r14_r13c3
jis_a*_from_autocad_r14_r13c3, din_a*_from_autocad_r14_r13c3
ebatchp_from_autocad_r14_r13c3
colorwh_from_autocad_r14_r13c3
chroma_from_autocad_r14_r13c3
truetype_from_autocad_r14_r13c3
all others can be read ok
Found the root cause: Some older DWGs have no classes. CLASS section size 38, which is a size of 0.
Change the wrong loop.
|
Cannot read some r13c3 classes
|
https://api.github.com/repos/LibreDWG/libredwg/issues/294/comments
| 1 |
2020-11-12T19:54:54Z
|
2020-11-13T09:25:05Z
|
https://github.com/LibreDWG/libredwg/issues/294
| 741,884,625 | 294 |
[
"LibreDWG",
"libredwg"
] |
I want to use the `SDS` tool to process strings, but I tried several times and couldn't compile. I don't know how to use it in the project. I want use `SDS` like `jsmn`, but failure. I am not good at dealing with C language engineering. I need some help. Thanks.
[https://github.com/antirez/sds](url)
|
Can add SDS(Simple Dynamic Strings) to the project
|
https://api.github.com/repos/LibreDWG/libredwg/issues/293/comments
| 1 |
2020-11-12T09:50:34Z
|
2020-11-13T09:29:52Z
|
https://github.com/LibreDWG/libredwg/issues/293
| 741,448,885 | 293 |
[
"LibreDWG",
"libredwg"
] |
e.g. with Sense_TYRKYS_from_autocad.aec-data.com_AC1018.dxf
3
/<*-): {rn {rn {rn {o 90-(>-; $ :'//< 1*=, {l {o {lg rnhhlqoh {l rnhkfqmm {l rnhmjqml {l rnhonqmk {l rnihhqmi {l rnijlqmh {l rnimfqmg {l rniojql {l rnjgnqln {l rnjjhqlm {l rnjllqlk {l rnjofqlj {l rnkgjqli {l rnkinqlh {l rnklhqlf {l rnknlqk {l rnlgfqkn {l rnlijqkl {l rnlknqkk {l rnlnhqkj {l rnmflqkh {l rnmifqkg {l rnmkjqkf {l rnmmnqj {l rnnfhqjm {l rnnhlqjl {l rnnkfqjk {l rnnmjqji {l rnnonqjh {l rnohhqjg {l rnojlqi {l rnomfqin {l rnoojqim {l rfgnqilj {l rfjhqikg {l rfllqiin {l rfofqihk {l rggiqkh {l mloqgnk rjqigklk:rnk mloqgnk nlqjoml mloqgnk mlqkjoj mloqgnk lnqhkgl mloqgnk koqofmk mloqgnk kiqhihg mloqiki jmqonf mloqkhh jhqmhol mloqnkn inqofhk mmfqhm ikqmjhn mmfqmff ihqknig mmgqhfk ifqfogf mmgqnm hmqjlkj mmhqkkh hjqnion mmiqioj hhqfnfl mmjqgoj goqofff mmjqooi gmqmgoj mmkqmkg glqggmj mmlqojl giqlihf mmnqgjg ggqgjlm mmoqmmh fmqmmnf mngqkih fjqff mniqhog ffqhjgn mnkqgmn nolqfmi mnlqnmm nogqokf mnnqkmk nnmqnhm mofqfnk nniqmjn mogqkgf nmoqkil mohqoil nmkqihj mojqhmn nmfqom mokqnoi nlkqghm momqkfm nkoqhmj mooqioj nkgqogk nfgqfmg njjqn nfhqmj nimqnnj nfjqhgm nigqhgi nfkqfom nhlqhh nfkqoml nhgqhjl nflqhl ngmqokf nflqmfm ngiqlhj nfmqgjk nfoqhon nfmqmif nfiqoji nfnqghf momqogm nfnqkf mogqnoh nfnqmfj mnkqgom nfnqmfj mmoqimn nfnqmfj mmiqkk nfnqkf mlnqlgk nfnqgln mljqkon nfmqnhm mlfqknh nfmqijf mkmqjoh nfmqfom mkjqkkl nflqnki mkgqlhg nflqnki mjnqnjf nfmqmm mjlqigm nfnqmfj mjiqmoi ngfqkkk mjgqkhm ngiqiig mioqoni nglqgfn minqjin ngoqngf mimqlgj nhmqhlh milqool nijqmgj milqimn njkqogm mikqoll nknqhjf mikqngg nmfqkli mikqlkm nnjqffm mikqmlf fhqlin milqflj hgqhmfg milqiln jkqfnog milqnmj llqfkkm mimqhnj nmqfhhi mimqloj rjqnliii minqffn rmlqlmjm minqihh rknqjnlh minqlil rjfqhhik minqokf rhiqolkh mioqlkl rfmqmfl mjfqili rnoiqjkh mjgqjlg rnmnqgjl mjhqjgm rnlhqnjf mjiqimi rnjlqjnh mjjqgnk rnikqgnl mjjqoff rnhiqnn mjkqlgk rngmqlkk mjlqhii rngiqhmg mjlqnff rnfnqnnm mjmqill rnflqikj mjmqnng rnfjqhgg mjnqoli rnfhqfln mkfqfjj rnffqigk mkgqloh rmonqjlj mkiqofl rmolqlgi mklqghg rmojqllj mknqofh rmoiqffn mlhqikh rmogqikh mlkqnfh rmnoqonn mloqohh rmnnqlhk mmlqhfk rmnmqhlg mnhqjnn rmnkqnom mofqoii rmnjqhjg nfhqhli rmnhqknk ngiqkoh rmnfqlim nhmqnfl rmmnqoih njgqkkk rmmmqhhm nkkqifk rmmkqmll nlnqkoh rmmjqljk nnjqhjm rmmiqkhk nooqofh rmmhqmjl gmqohmi rmmgqoog ijqjihi rmmgqhlg kfqionl rmmfqkki ljqojih rmloqgnk rmqgkmnh:rnl o /3>1: mimqign lohqong llfqkhj ro ro rn o rn o 90-(>-;@) 90-(>-;@) 90-(>-;@) 90-(>-;@) 90-(>-;@) " o o |
|
dxf: split overlong SAB 3 lines
|
https://api.github.com/repos/LibreDWG/libredwg/issues/292/comments
| 1 |
2020-11-09T10:16:20Z
|
2020-11-10T16:31:55Z
|
https://github.com/LibreDWG/libredwg/issues/292
| 738,891,631 | 292 |
[
"LibreDWG",
"libredwg"
] |
Missing support for tag 21 `(enum <identifier>)` in ASM data.
Example: https://forums.autodesk.com/t5/autocad-forum/autocad-modeling-errors/td-p/7240558 "new block.dwg"
```
...
color-adesk-attrib $-1 $-1 $-1 $-1 $327 $1 #
intcurve-curve $-1 $-1 $-1 F { exact_int_cur ERROR: Unknown SAB tag 21
ERROR: Unknown SAB tag 0
ERROR: Unknown SAB tag 0
ERROR: Unknown SAB tag 0
ERROR: Unknown SAB tag 0
nurbs $2 ERROR: Unknown SAB tag 21
ERROR: Unknown SAB tag 0
ERROR: Unknown SAB tag 0
ERROR: Unknown SAB tag 0
ERROR: Unknown SAB tag 0
$2 0 $2 0.0272823 $2 8.87474 18.7907 1.75 1 8.89245 18.7769 1.73056 1.05245 8.90777 18.765 1.71474 1.09939 0 null_surface null_surface nullbs nullbs F F $0 $0 $0 $0 I 1 I 0 } F F #
```
Just guessing what the exact format is:
The enum seems to be the previous identifier.
e.g. exact_int_cur <21> $0 means the identifier int_cur
has the enum value exact and a long constant $0. but nurbs $2 <21> $0?
This example throws now "Bad entity layer"
|
Unknown SAB tag 21
|
https://api.github.com/repos/LibreDWG/libredwg/issues/291/comments
| 0 |
2020-11-06T21:04:00Z
|
2020-11-06T21:37:18Z
|
https://github.com/LibreDWG/libredwg/issues/291
| 738,041,672 | 291 |
[
"LibreDWG",
"libredwg"
] |
acad throws fatal dxfin errors on some wrong or missing dxf codes, but silently accepts some other undocumented codes.
such as 61 . 0 in AcDbEntity. 63 is also accepted. apparently some other colors, as produced by other DXF exporters, Probably BricsCAD, as it also contains OpenCASCADE ACIS data, which throws a general ACIS warning 30005
Do the same.
|
indxf: accept some DXF groups, like 61 in AcDbEntity
|
https://api.github.com/repos/LibreDWG/libredwg/issues/290/comments
| 0 |
2020-11-06T19:54:50Z
|
2020-11-08T15:29:47Z
|
https://github.com/LibreDWG/libredwg/issues/290
| 738,005,529 | 290 |
[
"LibreDWG",
"libredwg"
] |
nrcs141p2_034463_2013 (25D1):
280 . 2059 (BS cloning flag) vs 1
decode ERROR: Invalid xdata type -28034 [RS]
whenever a BLL is involved.
xdata_size: 176 [BL 0]
xdata[0]: 0 [BLL 160]
ERROR: Invalid xdata type -28034 [RS]
cloning: 2059 [BS 280]
280
2059
160
vs
280
1
160
1464717839
70
1032
1
10.3.894.0
1
C3D_14SP2_Prod64_894.0
1
AutoCAD Civil 3D
...
stelprdb1144445_2013 (3DA7): 280 . 2057 (BS cloning flag) vs 1
160 . "" vs 1473174154, ...
decode
xdata_size: 176 [BL 0]
xdata[0]: 3094533718 [BLL 160]
xdata[2]: 0.000000 [RD 48]
xdata[3]: 368 [RS 384]
xdata[4]: 29884784 [RL 424]
xdata[6]: 128.0.0 [H 368]
ERROR: Invalid group code in xdata[7]: 664
Warning: xdata read 46, expected 176
cloning: 2057 [BS 280]
|
XRECORD Invalid xdata after BLL => DXF read error
|
https://api.github.com/repos/LibreDWG/libredwg/issues/289/comments
| 2 |
2020-11-05T07:24:50Z
|
2020-11-05T10:29:45Z
|
https://github.com/LibreDWG/libredwg/issues/289
| 736,683,531 | 289 |
[
"LibreDWG",
"libredwg"
] |
example_2007,2010
probably related to the missing ACAD_GROUP block. #285
|
dxf: File lacks the NamedObject dictionary
|
https://api.github.com/repos/LibreDWG/libredwg/issues/288/comments
| 1 |
2020-11-05T07:12:55Z
|
2020-11-10T16:32:32Z
|
https://github.com/LibreDWG/libredwg/issues/288
| 736,676,810 | 288 |
[
"LibreDWG",
"libredwg"
] |
flipped_2013 only
the original has an empty name with flag is_shape only.
|
dxf: STYLE Invalid textstyle name for shapeFile: "SHAPE$0$REF"
|
https://api.github.com/repos/LibreDWG/libredwg/issues/287/comments
| 1 |
2020-11-05T07:12:48Z
|
2020-11-05T12:21:25Z
|
https://github.com/LibreDWG/libredwg/issues/287
| 736,676,749 | 287 |
[
"LibreDWG",
"libredwg"
] |
blocks_and_tables_-_imperial_2007
|
dxf: BLOCKBASEPOINTPARAMETER DXF read error
|
https://api.github.com/repos/LibreDWG/libredwg/issues/286/comments
| 2 |
2020-11-05T07:12:44Z
|
2020-11-11T12:11:40Z
|
https://github.com/LibreDWG/libredwg/issues/286
| 736,676,711 | 286 |
[
"LibreDWG",
"libredwg"
] |
example_r13-2004
even if the NOD contains ACAD_GROUP (D) and the NOD (C) and DICTIONARY (D) look
correct. baffling. maybe the referenced block *A1 from D is missing.
|
dxf: GroupTable dictionary was not defined in NamedObject dictionary
|
https://api.github.com/repos/LibreDWG/libredwg/issues/285/comments
| 1 |
2020-11-05T07:02:15Z
|
2020-11-10T16:32:52Z
|
https://github.com/LibreDWG/libredwg/issues/285
| 736,671,294 | 285 |
[
"LibreDWG",
"libredwg"
] |
Multileader_2004
This was created with Teigha and the DWG cannot even be opened with acad, the DXF neither.
|
dxf: MLEADERSTYLE: DXF read error
|
https://api.github.com/repos/LibreDWG/libredwg/issues/284/comments
| 1 |
2020-11-05T07:02:04Z
|
2020-11-10T17:23:43Z
|
https://github.com/LibreDWG/libredwg/issues/284
| 736,671,183 | 284 |
[
"LibreDWG",
"libredwg"
] |
versions: r13,2000,2004,2007,2010
files: TS1_{r13,2000}, BoxUnion_2004, ATMOS-DC22S_2007,
sun_and_sky_demo_2010, ...
|
dxf: 3DSOLID: Premature end of object
|
https://api.github.com/repos/LibreDWG/libredwg/issues/283/comments
| 3 |
2020-11-05T07:02:03Z
|
2020-11-10T16:33:59Z
|
https://github.com/LibreDWG/libredwg/issues/283
| 736,671,168 | 283 |
[
"LibreDWG",
"libredwg"
] |
versions: 2013, 2018
files: JW_2013, example_201{3,8}
|
dxf: 3DSOLID: Class separator for class AcDb3dSolid expected
|
https://api.github.com/repos/LibreDWG/libredwg/issues/282/comments
| 1 |
2020-11-05T07:01:55Z
|
2020-11-08T15:29:47Z
|
https://github.com/LibreDWG/libredwg/issues/282
| 736,671,093 | 282 |
[
"LibreDWG",
"libredwg"
] |
In some scenarios, we will store some data in `xdata`. The current `geojson` file does not contain these data. This function can be added in future versions.
When use `dwgread.exe` to save as `dxf` file, it can contain the `XData` content . but save to `geojson` file, will not contain.
```C
#include <stdio.h>
#include <stdlib.h>
#include "dwg.h"
#include "bits.h"
/**
* get xdata
* @param obj Dwg_Object
*/
void object_eed(Dwg_Object *obj) {
Dwg_Object_Object *obj_obj = obj->tio.object;
for (unsigned i = 0; i < obj_obj->num_eed; i++) {
Dwg_Eed eed = obj_obj->eed[i];
if (eed.size) {
Dwg_Object *appid = dwg_resolve_handle(obj_obj->dwg, eed.handle.value);
if (appid && appid->fixedtype == DWG_TYPE_APPID) {
char *name = appid->tio.object->tio.APPID->name;
char *utf8 = bit_convert_TU((BITCODE_TU) name);
printf("key: %s \n", utf8);
}
}
if (eed.data) {
const Dwg_Eed_Data *data = eed.data;
char *str_utf8 = bit_convert_TU((BITCODE_TU) data->u.eed_0.string);
printf("%d: %s \n", data->code, str_utf8);
free(str_utf8);
}
}
}
/**
* read xdata
* @param filename
*/
void read_xdata(const char *filename) {
Dwg_Data dwg;
unsigned int opts = 1;
dwg.opts = opts;
dwg_read_file(filename, &dwg);
for (unsigned i = 0; i < dwg.num_objects; i++) {
Dwg_Object obj = dwg.object[i];
Dwg_Object_Entity *entity = obj.tio.entity;
if (obj.supertype != DWG_SUPERTYPE_ENTITY) {
continue;
}
Dwg_Object *layer = entity->layer ? entity->layer->obj : NULL;
if (!layer || layer->type != DWG_TYPE_LAYER) {
continue;
}
object_eed(&obj);
}
dwg_free(&dwg);
}
```
[xdata.dwg.zip](https://github.com/LibreDWG/libredwg/files/5462649/xdata.dwg.zip)
|
Add xdata into geojson
|
https://api.github.com/repos/LibreDWG/libredwg/issues/281/comments
| 3 |
2020-10-30T02:31:58Z
|
2020-11-16T16:53:53Z
|
https://github.com/LibreDWG/libredwg/issues/281
| 732,833,132 | 281 |
[
"LibreDWG",
"libredwg"
] |
tablet_2007
The following error was encountered while reading
in HATCH starting at line 117396:
Error: expected group code 92
Invalid or incomplete DXF input -- drawing discarded.
5151-024_2010
Loading AEC Base...
Loading AEC Base Extended...
Loading AEC Core...
Loading AEC Project Base...
Loading AEC Architectural Base...
Loading AEC Schedule...
The following error was encountered while reading
in HATCH starting at line 21948:
Error: expected group code 330
Invalid or incomplete DXF input -- drawing discarded.
Dynblocks_2018
The following error was encountered while reading
in HATCH starting at line 12376:
Error: expected group code 75
Invalid or incomplete DXF input -- drawing discarded.
|
dxf: missing HATCH groups
|
https://api.github.com/repos/LibreDWG/libredwg/issues/280/comments
| 4 |
2020-10-29T13:54:24Z
|
2020-10-30T12:39:15Z
|
https://github.com/LibreDWG/libredwg/issues/280
| 732,335,109 | 280 |
[
"LibreDWG",
"libredwg"
] |
mostly with types > 500
|
decode: Invalid string stream data_size with r2007
|
https://api.github.com/repos/LibreDWG/libredwg/issues/279/comments
| 1 |
2020-10-29T09:33:37Z
|
2020-10-29T13:53:13Z
|
https://github.com/LibreDWG/libredwg/issues/279
| 732,152,464 | 279 |
[
"LibreDWG",
"libredwg"
] |
"The following error was encountered while reading in BLOCKSCALEACTION starting at line 121170:
Missing DXF group code: 1
Invalid or incomplete DXF input -- drawing discarded"
ODA skips those objects at all.
|
dxf: missing DXF 1 for BLOCKSCALEACTION, BLOCKROTATEACTION
|
https://api.github.com/repos/LibreDWG/libredwg/issues/278/comments
| 1 |
2020-10-29T07:09:09Z
|
2020-11-11T12:10:45Z
|
https://github.com/LibreDWG/libredwg/issues/278
| 732,064,913 | 278 |
[
"LibreDWG",
"libredwg"
] |
analog to Model_Space.
error msg: Entities not allowed in *Paper_Space block definition on line xxxx.
|
dxf: move Paper_Space BLOCK entities to ENTITIES
|
https://api.github.com/repos/LibreDWG/libredwg/issues/277/comments
| 0 |
2020-10-29T07:06:51Z
|
2020-11-08T15:29:46Z
|
https://github.com/LibreDWG/libredwg/issues/277
| 732,063,661 | 277 |
[
"LibreDWG",
"libredwg"
] |
Is there a way to know in which unit the data is? Or what value do you have to multiply it to get meters (_that's something that exists for FBX_)? Or is it part of the standard?
I'm currently importing some meshes, Polyline PFace objects, and they all look fine, but there's too big (_our unit is meter_).
Thanks.
**EDIT**
I found `LUNITS` (linear), `AUNITS` (angular), and `INSUNITS` (drawing units). `LUNITS` doesn't mean much, it's always set to `2`, which means `Decimal`... not a useful information. And `INSUNITS` is set to `0`, which is unspecified.
|
DWG get file units
|
https://api.github.com/repos/LibreDWG/libredwg/issues/276/comments
| 2 |
2020-10-26T22:17:09Z
|
2020-11-16T16:53:16Z
|
https://github.com/LibreDWG/libredwg/issues/276
| 729,946,698 | 276 |
[
"LibreDWG",
"libredwg"
] |
I have collected together many dwg files freely available online and compared the quality of the LibreDWG dwg->dxf conversion with the ODAFileConverter conversion. I'm using the ezdxf python library to read in the results.
Many of the dxf files produced by libreDWG cannot be opened in AutoCAD because they are invalid in some way but it is difficult to determine the cause using AutoCAD. ezdxf gives more detailed error information which may be useful for fixing these issues.
many files have an issue where an x coordinate is provided with no corresponding y coordinate. Examples include
[missing_y.zip](https://github.com/LibreDWG/libredwg/files/5422402/missing_y.zip)
obtained from [here](https://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autocad-sample-files.html) as dwg and converted using LibreDWG.
43 of 89 dwg files that I tested have this exact issue. I can share more examples if that would be helpful.
see https://github.com/mozman/ezdxf/issues/256 for details
Another very common issue with dxf files produced with libreDWG is that invalid (zero vector) start_tangents are provided for splines. A workaround has been implemented into ezdxf to discard these invalid values but AutoCAD refuses to load these files
an example of this issue is
[Ceco.NET-Architecture-Tm-272.dxf.zip](https://github.com/LibreDWG/libredwg/files/5422438/Ceco.NET-Architecture-Tm-272.dxf.zip)
obtained from [here](https://ceco.net/autocad-blocks/architecture/top-plan-view/autocad-drawing-villa-savoye-le-corbusier-second-floor-rooftop-dwg-dxf-272) and converted using LibreDWG
see https://github.com/mozman/ezdxf/issues/252 for details
A rarer issue is the one found from the color wheel file from [here](https://knowledge.autodesk.com/support/autocad/downloads/caas/downloads/content/autocad-sample-files.html).
[colorwh.dxf.zip](https://github.com/LibreDWG/libredwg/files/5422481/colorwh.dxf.zip)
(It looks like a newline character should have been escaped but wasn't? see https://github.com/mozman/ezdxf/issues/256#issuecomment-714413342)
again, see https://github.com/mozman/ezdxf/issues/256 for details
|
Creation of invalid dxf files
|
https://api.github.com/repos/LibreDWG/libredwg/issues/275/comments
| 14 |
2020-10-22T11:54:07Z
|
2020-11-18T16:01:29Z
|
https://github.com/LibreDWG/libredwg/issues/275
| 727,318,956 | 275 |
[
"LibreDWG",
"libredwg"
] |
I cloned the repository and ran `docker build .` The image did not build successfully and exited with:
```
...
...
make all-am
make[4]: Entering directory '/app/libredwg-0.11/bindings/python'
CC _LibreDWG_la-swig_python.lo
CCLD _LibreDWG.la
ar: `u' modifier ignored since `D' is the default (see `U')
make[4]: Leaving directory '/app/libredwg-0.11/bindings/python'
make[3]: Leaving directory '/app/libredwg-0.11/bindings/python'
make[3]: Entering directory '/app/libredwg-0.11/bindings'
/usr/bin/swig -perl5 -I/app/libredwg-0.11/include -o perl/LibreDWG.c ./dwg.i
/app/libredwg-0.11/include/dwg.h:5083: Warning 314: 'ref' is a perl keyword
/app/libredwg-0.11/include/dwg.h:8470: Warning 314: 'ref' is a perl keyword
make[3]: *** No rule to make target 'perl/LibreDWG.xs', needed by 'all-am'. Stop.
make[3]: Leaving directory '/app/libredwg-0.11/bindings'
make[2]: Leaving directory '/app/libredwg-0.11/bindings'
make[2]: *** [Makefile:459: all-recursive] Error 1
make[1]: Leaving directory '/app/libredwg-0.11'
make[1]: *** [Makefile:669: all-recursive] Error 1
make: *** [Makefile:552: all] Error 2
The command '/bin/sh -c tarxz=`curl --silent 'https://ftp.gnu.org/gnu/libredwg/?C=M;O=D' | grep '.tar.xz<' | head -n1|sed -E 's/.*href="([^"]+)".*/\1/'`; echo "latest release $tarxz"; curl --silent --output "$tarxz" https://ftp.gnu.org/gnu/libredwg/$tarxz && tar xfJ "$tarxz" && cd `echo "$tarxz" | sed s'/.tar.xz//'` && ./configure --enable-release && make && mkdir install && make install DESTDIR="$PWD/install" && make check DOCKER=1 DESTDIR="$PWD/install"' returned a non-zero code: 2
```
|
Dockerfile fails to build correctly
|
https://api.github.com/repos/LibreDWG/libredwg/issues/273/comments
| 3 |
2020-10-21T09:22:40Z
|
2020-10-22T09:43:45Z
|
https://github.com/LibreDWG/libredwg/issues/273
| 726,300,365 | 273 |
[
"LibreDWG",
"libredwg"
] |
Hi
Reading these files using the current binary assert reports many errors :
```
Warning: checksum: 0x31b7133b (calculated) mismatch
ERROR: read_R2004_section_info out of range
Warning: Failed to find section_info[7] with type 1
ERROR: Failed to read compressed Header section
ERROR: Invalid .props x 28191
Warning: Failed to find section_info[7] with type 3
ERROR: Failed to read compressed Classes section
Warning: Skip empty section 2329 AcDb:AcDbObjects
ERROR: Invalid opcode 0x0 in input stream at pos 294
ERROR: Failed to read compressed AcDbObjects section
Warning: Failed to find section_info[7] with type 2
ERROR: Failed to read uncompressed AuxHeader section
ERROR: Preview overflow > 29067
Warning: thumbnail.size mismatch: 29071 != 0
ERROR: Some section size or address out of bounds
ERROR: Template section not found
...
```
Please download samples from https://easyupload.io/jvzytl
Teigha or AutoCAD can read them. If I convert them to other dwg formats (lower or higher), they open fine.
This seems to be a file specific issue.
|
DWG large files errors
|
https://api.github.com/repos/LibreDWG/libredwg/issues/272/comments
| 9 |
2020-10-14T11:46:12Z
|
2022-04-11T05:31:01Z
|
https://github.com/LibreDWG/libredwg/issues/272
| 721,387,876 | 272 |
[
"LibreDWG",
"libredwg"
] |
Use dwgread.exe to save as Geojson file, the Text is not converted to utf-8
|
https://api.github.com/repos/LibreDWG/libredwg/issues/271/comments
| 3 |
2020-10-13T03:12:58Z
|
2020-10-30T06:49:58Z
|
https://github.com/LibreDWG/libredwg/issues/271
| 719,819,854 | 271 |
|
[
"LibreDWG",
"libredwg"
] |
So based on some information that I found (_particularly the SVG program_), for a 3D face, it looks like it can produce triangles or quads (_any other would be invalid_). Still, better info about the `invis_flags` would be useful here.
As for `solid`, where can I find documentation about all the fields, what it would represent in 3D and how to create triangles out of it?
Similar question for anything else that could create 3D solid data.
|
How tessellate 3D data?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/270/comments
| 1 |
2020-09-08T13:06:36Z
|
2020-11-05T08:03:54Z
|
https://github.com/LibreDWG/libredwg/issues/270
| 695,853,814 | 270 |
[
"LibreDWG",
"libredwg"
] |
For https://github.com/tercoide/GauchoCAD
See the `work/gambas` branch, and the new add api, but in the end
only https://github.com/LibreDWG/gambas3-bindings
gambas3 has no pkgconfig support, and places its headers somewhere.
|
add gambas bindings
|
https://api.github.com/repos/LibreDWG/libredwg/issues/269/comments
| 2 |
2020-09-02T09:05:15Z
|
2020-12-07T15:31:37Z
|
https://github.com/LibreDWG/libredwg/issues/269
| 690,851,006 | 269 |
[
"LibreDWG",
"libredwg"
] |
Tried to build Dockerfile of cloned repo
```
$ docker build -t libredwg .
...
HELIX 1BF ../../test/test-data/2018/Helix.dwg
not ok 1 # HELIX.radius: 6.827832 <=> "0.0" [BD 40] REAL
ok 2 # HELIX.major_version: 31
ok 3 # HELIX.maint_version: 8
ok 4 # HELIX.turns: 3.000000
ok 5 # HELIX.handedness: 1
Exception 0xc0000005 0x0 0xc000638000 0x7e13a4f9
PC=0x7e13a4f9
signal arrived during external code execution
```
and docker crashes when handling the SEGV
Full console output https://paste.debian.net/1162131/
|
Dockfiler building crashes with SEGV in dxf_test
|
https://api.github.com/repos/LibreDWG/libredwg/issues/268/comments
| 3 |
2020-09-01T14:45:36Z
|
2020-11-05T08:03:13Z
|
https://github.com/LibreDWG/libredwg/issues/268
| 690,204,200 | 268 |
[
"LibreDWG",
"libredwg"
] |
Hi, I tried using dwg2SVG commandline utility, however it failed with all of my dwg files resulting in generating empty svg files.
Is that a known problem?
|
dwg2SVG is creating empty file
|
https://api.github.com/repos/LibreDWG/libredwg/issues/267/comments
| 7 |
2020-08-19T09:52:58Z
|
2021-04-08T14:13:06Z
|
https://github.com/LibreDWG/libredwg/issues/267
| 681,706,148 | 267 |
[
"LibreDWG",
"libredwg"
] |
Hi,
We would like to know if we can use LibreDWG to import meshes from .dwg to the real time engine for rendering.
Thanks for your work on this so far!
|
LibreDWG for Unreal Engine 4.
|
https://api.github.com/repos/LibreDWG/libredwg/issues/266/comments
| 5 |
2020-08-05T01:14:23Z
|
2020-09-01T11:26:50Z
|
https://github.com/LibreDWG/libredwg/issues/266
| 673,180,151 | 266 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [66a348](https://github.com/LibreDWG/libredwg/commit/66a3484bda00ff5af2bdb79e41db3b066fdd0d00))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwg2dxf -b -m ./unknown-crash-read_R2004_section_info -o /dev/null
## AddressSanitizer output
```
=================================================================
==1707==ERROR: AddressSanitizer: unknown-crash on address 0x619000009ff4 at pc 0x5586380c6d59 bp 0x7fff56f61360 sp 0x7fff56f61350
READ of size 16 at 0x619000009ff4 thread T0
#0 0x5586380c6d58 in read_R2004_section_info /home/seviezhou/libredwg/src/decode.c:2264
#1 0x5586380c6d58 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3672
#2 0x5586380cc3fe in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#3 0x558637fc37da in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#4 0x558637fc0f0a in main /home/seviezhou/libredwg/programs/dwg2dxf.c:258
#5 0x7f86772bbb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#6 0x558637fc1df9 in _start (/home/seviezhou/libredwg/programs/dwg2dxf+0xa8cdf9)
0x61900000a000 is located 0 bytes to the right of 1152-byte region [0x619000009b80,0x61900000a000)
allocated by thread T0 here:
#0 0x7f8677ac17aa in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x987aa)
#1 0x5586380c5643 in read_R2004_section_info /home/seviezhou/libredwg/src/decode.c:2110
#2 0x5586380c5643 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3672
#3 0x5586380cc3fe in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
SUMMARY: AddressSanitizer: unknown-crash /home/seviezhou/libredwg/src/decode.c:2264 read_R2004_section_info
Shadow bytes around the buggy address:
0x0c327fff93a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c327fff93b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c327fff93c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c327fff93d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c327fff93e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c327fff93f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00[00]00
0x0c327fff9400: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c327fff9410: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c327fff9420: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c327fff9430: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c327fff9440: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
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
==1707==ABORTING
```
## POC
[unknown-crash-read_R2004_section_info-decode-2264.zip](https://github.com/LibreDWG/libredwg/files/5022051/unknown-crash-read_R2004_section_info-decode-2264.zip)
|
An unknown crash in decode.c:2264
|
https://api.github.com/repos/LibreDWG/libredwg/issues/265/comments
| 0 |
2020-08-04T12:26:27Z
|
2020-08-04T16:42:43Z
|
https://github.com/LibreDWG/libredwg/issues/265
| 672,752,811 | 265 |
[
"LibreDWG",
"libredwg"
] |
Good day.
I suggest replacing in the dwg.spec file
code
FIELD_2DD (alignment_pt, 10.0, 20.0, 11);
on the
FIELD_2DD (alignment_pt, _obj-> ins_pt.x, _obj-> ins_pt.y, 11);
How is done in libdxfrw library
Otherwise, the text object receives an invalid ins_pt value.
https://cloud.mail.ru/public/4nma/2pWfz8P6S
And in the RESBUF_VALUE_TYPE enumeration, if possible, then rename VT_BOOL = 10
Since it conflicts with the wtypes.h file VT_BOOL = 11
C: /Qt/Tools/mingw810_64/x86_64-w64-mingw32/include/wtypes.h
Thank
|
Invalid parameter in object TEXT alignment_pt (dwg.spec)
|
https://api.github.com/repos/LibreDWG/libredwg/issues/264/comments
| 2 |
2020-08-04T08:40:39Z
|
2020-08-04T13:39:43Z
|
https://github.com/LibreDWG/libredwg/issues/264
| 672,615,889 | 264 |
[
"LibreDWG",
"libredwg"
] |
Hi. Does LibreDWG read 3D CAD drawings? If yes, what formats can it be converted to?
|
3D CAD Drawings
|
https://api.github.com/repos/LibreDWG/libredwg/issues/263/comments
| 1 |
2020-08-04T07:01:58Z
|
2021-01-31T15:13:15Z
|
https://github.com/LibreDWG/libredwg/issues/263
| 672,556,509 | 263 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [bacd017](https://github.com/LibreDWG/libredwg/commit/bacd01778d20b7b79f28541ea7a60cafe25175aa))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwg2dxf -b -m ./SEGV-bit_read_BB-bits-186 -o /dev/null
## Output
```
Segmentation fault (core dumped)
```
## AddressSanitizer output
```
ASAN:SIGSEGV
=================================================================
==33413==ERROR: AddressSanitizer: SEGV on unknown address 0x63001eedeec1 (pc 0x56001ae1aa1c bp 0x7ffc0f008820 sp 0x7ffc0f008570 T0)
#0 0x56001ae1aa1b in bit_read_BB /home/seviezhou/libredwg/src/bits.c:186
#1 0x56001ae3d11b in bit_read_BS /home/seviezhou/libredwg/src/bits.c:525
#2 0x56001ae3d11b in bit_read_TU /home/seviezhou/libredwg/src/bits.c:1891
#3 0x56001ae4d52b in bit_read_CMC /home/seviezhou/libredwg/src/bits.c:2610
#4 0x56001a5261c2 in dwg_decode_VIEWPORT_private /home/seviezhou/libredwg/src/dwg.spec:1674
#5 0x56001aef02ff in dwg_decode_VIEWPORT /home/seviezhou/libredwg/src/dwg.spec:1607
#6 0x56001aef02ff in dwg_decode_add_object /home/seviezhou/libredwg/src/decode.c:5583
#7 0x56001aef77b8 in read_2004_section_handles /home/seviezhou/libredwg/src/decode.c:2843
#8 0x56001aef77b8 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3682
#9 0x56001af060ba in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#10 0x56001adfcd94 in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#11 0x56001adfa242 in main /home/seviezhou/libredwg/programs/dwg2dxf.c:258
#12 0x7f13152a8b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#13 0x56001adfb2b9 in _start (/home/seviezhou/libredwg/programs/dwg2dxf+0xa8d2b9)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/seviezhou/libredwg/src/bits.c:186 bit_read_BB
==33413==ABORTING
```
## POC
[SEGV-bit_read_BB-bits-186.zip](https://github.com/LibreDWG/libredwg/files/5016490/SEGV-bit_read_BB-bits-186.zip)
|
A Segmentation fault in bits.c:186
|
https://api.github.com/repos/LibreDWG/libredwg/issues/262/comments
| 2 |
2020-08-03T14:19:33Z
|
2020-08-04T09:51:29Z
|
https://github.com/LibreDWG/libredwg/issues/262
| 672,111,174 | 262 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [39ef943](https://github.com/LibreDWG/libredwg/commit/39ef9439f35111170258cf57cc0c58eabc4748c7))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwg2dxf -b -m ./SEGV-check_POLYLINE_handles-decode-5110 -o /dev/null
## AddressSanitizer output
```
=================================================================
==65289==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62c0000381ff at pc 0x7fc1be68a945 bp 0x7fff3419f990 sp 0x7fff3419f138
READ of size 6 at 0x62c0000381ff thread T0
#0 0x7fc1be68a944 in __asan_memcpy (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x8c944)
#1 0x5588916f116f in memcpy /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34
#2 0x5588916f116f in bit_read_fixed /home/seviezhou/libredwg/src/bits.c:1424
#3 0x558891715678 in acds_private /home/seviezhou/libredwg/src/acds.spec:111
#4 0x5588917b3161 in read_2004_section_acds /home/seviezhou/libredwg/src/decode.c:3437
#5 0x5588917b3161 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3694
#6 0x5588917bf646 in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#7 0x5588916b89fc in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#8 0x5588916b5e12 in main /home/seviezhou/libredwg/programs/dwg2dxf.c:258
#9 0x7fc1bde90b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#10 0x5588916b6d69 in _start (/home/seviezhou/libredwg/programs/dwg2dxf+0xa88d69)
0x62c0000381ff is located 1 bytes to the left of 29696-byte region [0x62c000038200,0x62c00003f600)
allocated by thread T0 here:
#0 0x7fc1be6967aa in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x987aa)
#1 0x5588917211c4 in read_2004_compressed_section /home/seviezhou/libredwg/src/decode.c:2432
#2 0x5588922c13aa (/home/seviezhou/libredwg/programs/dwg2dxf+0x16933aa)
SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 __asan_memcpy
Shadow bytes around the buggy address:
0x0c587fffefe0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c587fffeff0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c587ffff000: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c587ffff010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c587ffff020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c587ffff030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa[fa]
0x0c587ffff040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c587ffff050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c587ffff060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c587ffff070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c587ffff080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
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
==65289==ABORTING
```
## POC
[heap-overflow-bit_read_fixed-bits-1424.zip](https://github.com/LibreDWG/libredwg/files/5011661/heap-overflow-bit_read_fixed-bits-1424.zip)
|
A heap overflow in bits.c:1424
|
https://api.github.com/repos/LibreDWG/libredwg/issues/261/comments
| 1 |
2020-08-02T04:51:37Z
|
2020-08-02T12:15:30Z
|
https://github.com/LibreDWG/libredwg/issues/261
| 671,508,299 | 261 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [39ef943](https://github.com/LibreDWG/libredwg/commit/39ef9439f35111170258cf57cc0c58eabc4748c7))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwg2dxf -b -m ./assert-fail-decode-3574 -o /dev/null
## Output
```
Reading DWG file /home/seviezhou//experiment-1/AlphaFuzz-libredwg/alpha_out/crashes/id:000007,src:000001,op:arith8,pos:213,val:+17
dwg2dxf: decode.c:3574: decode_R2004_header: Assertion `dwg->r2004_header.section_map_address' failed.
Aborted (core dumped)
```
## POC
[assert-fail-decode-3574.zip](https://github.com/LibreDWG/libredwg/files/5011582/assert-fail-decode-3574.zip)
|
Assertion fail in decode.c:3574
|
https://api.github.com/repos/LibreDWG/libredwg/issues/260/comments
| 0 |
2020-08-02T03:13:02Z
|
2020-08-02T12:15:30Z
|
https://github.com/LibreDWG/libredwg/issues/260
| 671,443,274 | 260 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwgbmp (latest master [39ef943](https://github.com/LibreDWG/libredwg/commit/39ef9439f35111170258cf57cc0c58eabc4748c7))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./dwgbmp ./malloc-size-error-read_2004_section_acds-3437
## AddressSanitizer output
```
==19408==WARNING: AddressSanitizer failed to allocate 0x002a02e603b8 bytes
==19408==AddressSanitizer's allocator is terminating the process instead of returning 0
==19408==If you don't like this behavior set allocator_may_return_null=1
==19408==AddressSanitizer CHECK failed: ../../../../src/libsanitizer/sanitizer_common/sanitizer_allocator.cc:147 "((0)) != (0)" (0x0, 0x0)
#0 0x7fb92ffea611 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa0611)
#1 0x7fb92ffef5c3 in __sanitizer::CheckFailed(char const*, int, char const*, unsigned long long, unsigned long long) (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa55c3)
#2 0x7fb92ff67393 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x1d393)
#3 0x7fb92ffed845 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0xa3845)
#4 0x7fb92ff6cabd (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x22abd)
#5 0x7fb92ff6d987 (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x23987)
#6 0x7fb92ffe2775 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98775)
#7 0x556356d48717 in acds_private /home/seviezhou/libredwg/src/acds.spec:47
#8 0x556356de6551 in read_2004_section_acds /home/seviezhou/libredwg/src/decode.c:3437
#9 0x556356de6551 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3694
#10 0x556356df2a36 in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#11 0x556356cebdec in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#12 0x556356ce9e28 in get_bmp /home/seviezhou/libredwg/programs/dwgbmp.c:120
#13 0x556356ce8ed0 in main /home/seviezhou/libredwg/programs/dwgbmp.c:301
#14 0x7fb92f7dcb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#15 0x556356ce96a9 in _start (/home/seviezhou/libredwg/programs/dwgbmp+0x4e76a9)
```
## POC
[malloc-size-error-read_2004_section_acds-3437.zip](https://github.com/LibreDWG/libredwg/files/5011560/malloc-size-error-read_2004_section_acds-3437.zip)
|
Malloc size error in decode.c:3437
|
https://api.github.com/repos/LibreDWG/libredwg/issues/259/comments
| 0 |
2020-08-02T02:53:55Z
|
2020-08-02T12:15:29Z
|
https://github.com/LibreDWG/libredwg/issues/259
| 671,430,545 | 259 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwgbmp (latest master [39ef943](https://github.com/LibreDWG/libredwg/commit/39ef9439f35111170258cf57cc0c58eabc4748c7))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwgbmp ./heap-overflow-bit_wcs2nlen-bit-1636
## AddressSanitizer output
```
=================================================================
==23940==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61600000ec80 at pc 0x558b22fdc723 bp 0x7ffe585f6d40 sp 0x7ffe585f6d30
READ of size 2 at 0x61600000ec80 thread T0
#0 0x558b22fdc722 in bit_wcs2nlen /home/seviezhou/libredwg/src/bits.c:1636
#1 0x558b22c13540 in dwg_decode_LTYPE_private /home/seviezhou/libredwg/src/dwg.spec:3020
#2 0x558b2308fb8d in dwg_decode_LTYPE /home/seviezhou/libredwg/src/dwg.spec:2936
#3 0x558b2308fb8d in dwg_decode_add_object /home/seviezhou/libredwg/src/decode.c:5669
#4 0x558b23097a03 in read_2004_section_handles /home/seviezhou/libredwg/src/decode.c:2843
#5 0x558b23097a03 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3680
#6 0x558b230a5a36 in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#7 0x558b22f9edec in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#8 0x558b22f9ce28 in get_bmp /home/seviezhou/libredwg/programs/dwgbmp.c:120
#9 0x558b22f9bed0 in main /home/seviezhou/libredwg/programs/dwgbmp.c:301
#10 0x7f0a4446eb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#11 0x558b22f9c6a9 in _start (/home/seviezhou/libredwg/programs/dwgbmp+0x4e76a9)
0x61600000ec81 is located 0 bytes to the right of 513-byte region [0x61600000ea80,0x61600000ec81)
allocated by thread T0 here:
#0 0x7f0a44c747aa in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x987aa)
#1 0x558b22fd7de8 in bit_read_TF /home/seviezhou/libredwg/src/bits.c:1444
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/seviezhou/libredwg/src/bits.c:1636 bit_wcs2nlen
Shadow bytes around the buggy address:
0x0c2c7fff9d40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fff9d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c2c7fff9d90:[01]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fff9db0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9dc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9dd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
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
==23940==ABORTING
```
## POC
[heap-overflow-bit_wcs2nlen-bit-1636.zip](https://github.com/LibreDWG/libredwg/files/5011540/heap-overflow-bit_wcs2nlen-bit-1636.zip)
|
Heap overflow due to incomplete fix for issues #255
|
https://api.github.com/repos/LibreDWG/libredwg/issues/258/comments
| 0 |
2020-08-02T02:25:59Z
|
2020-08-02T12:15:29Z
|
https://github.com/LibreDWG/libredwg/issues/258
| 671,412,127 | 258 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [4b99ed](https://github.com/LibreDWG/libredwg/commit/4b99edb0ea26e99ef65c5fe68670e6b1f9382d44))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwg2dxf -b -m ./double-free-dwg_free-free-1314 -o /dev/null
## AddressSanitizer output
```
=================================================================
==39755==ERROR: AddressSanitizer: attempting double-free on 0x60400000dfd0 in thread T0:
#0 0x7f2009c8a2da in free (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x982da)
#1 0x555ce2572f6f in dwg_free /home/seviezhou/libredwg/src/free.c:1314
#2 0x555ce22818c2 in main /home/seviezhou/libredwg/programs/dwg2dxf.c:363
#3 0x7f2009484b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#4 0x555ce22828f9 in _start (/home/seviezhou/libredwg/programs/dwg2dxf+0xa528f9)
0x60400000dfd0 is located 0 bytes inside of 40-byte region [0x60400000dfd0,0x60400000dff8)
freed by thread T0 here:
#0 0x7f2009c8a2da in free (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x982da)
#1 0x555ce2570682 in dwg_free_header_vars /home/seviezhou/libredwg/src/free.c:1169
#2 0x555ce2570682 in dwg_free /home/seviezhou/libredwg/src/free.c:1268
#3 0x10100020201007e (<unknown module>)
previously allocated by thread T0 here:
#0 0x7f2009c8a7aa in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x987aa)
#1 0x555ce22ecd7d in dwg_decode_handleref /home/seviezhou/libredwg/src/decode.c:4568
#2 0x303ffffffffff (<unknown module>)
SUMMARY: AddressSanitizer: double-free ??:0 free
==39755==ABORTING
```
## POC
[double-free-dwg_free-free-1314.zip](https://github.com/LibreDWG/libredwg/files/5010784/double-free-dwg_free-free-1314.zip)
|
A double free in free.c:1314
|
https://api.github.com/repos/LibreDWG/libredwg/issues/257/comments
| 3 |
2020-08-01T15:03:38Z
|
2020-08-02T12:15:28Z
|
https://github.com/LibreDWG/libredwg/issues/257
| 670,943,442 | 257 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwgbmp (latest master [4b99ed](https://github.com/LibreDWG/libredwg/commit/4b99edb0ea26e99ef65c5fe68670e6b1f9382d44))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwgbmp ./double-free-dwg_free_MATERIAL_private-dwg.spec-7662 /tmp/a.bmp
## AddressSanitizer output
```
=================================================================
==29185==ERROR: AddressSanitizer: attempting double-free on 0x60c00000b140 in thread T0:
#0 0x7ff7ab4c22da in free (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x982da)
#1 0x55bd65d40854 in dwg_free_MATERIAL_private /home/seviezhou/libredwg/src/dwg.spec:7662
#2 0x55bd65dec9d4 in dwg_free_MATERIAL /home/seviezhou/libredwg/src/dwg.spec:7640
#3 0x55bd65e6c14e in dwg_free_object /home/seviezhou/libredwg/src/free.c:862
#4 0x55bd65e736fc in dwg_free /home/seviezhou/libredwg/src/free.c:1266
#5 0x55bd65b897d7 in bmp_free_dwg /home/seviezhou/libredwg/programs/dwgbmp.c:95
#6 0x55bd65b89e1b in get_bmp /home/seviezhou/libredwg/programs/dwgbmp.c:133
#7 0x55bd65b88bca in main /home/seviezhou/libredwg/programs/dwgbmp.c:301
#8 0x7ff7aacbcb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#9 0x55bd65b893e9 in _start (/home/seviezhou/libredwg/programs/dwgbmp+0x4e23e9)
0x60c00000b140 is located 0 bytes inside of 128-byte region [0x60c00000b140,0x60c00000b1c0)
freed by thread T0 here:
#0 0x7ff7ab4c22da in free (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x982da)
#1 0x55bd657f449b in dwg_decode_MATERIAL_private /home/seviezhou/libredwg/src/dwg.spec:7665
#2 0xb4 (<unknown module>)
previously allocated by thread T0 here:
#0 0x7ff7ab4c27aa in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x987aa)
#1 0x55bd657f2777 in dwg_decode_MATERIAL_private /home/seviezhou/libredwg/src/dwg.spec:7662
#2 0xb4 (<unknown module>)
SUMMARY: AddressSanitizer: double-free ??:0 free
==29185==ABORTING
```
## POC
[double-free-dwg_free_MATERIAL_private-dwg.spec-7662.zip](https://github.com/LibreDWG/libredwg/files/5010391/double-free-dwg_free_MATERIAL_private-dwg.spec-7662.zip)
|
A double free in dwg.spec:7662
|
https://api.github.com/repos/LibreDWG/libredwg/issues/256/comments
| 1 |
2020-08-01T12:56:26Z
|
2020-08-01T21:07:33Z
|
https://github.com/LibreDWG/libredwg/issues/256
| 670,848,928 | 256 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [aee0ea](https://github.com/LibreDWG/libredwg/commit/aee0ea1f52ef9603b981362c83b3fec324ebb199))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwg2dxf -b -m ./heap-buffer-overflow-bit_wcs2len-bits-1634 -o /dev/null
## AddressSanitizer output
```
=================================================================
==15425==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61600000ec80 at pc 0x561b14ea8544 bp 0x7ffcc39e7810 sp 0x7ffcc39e7800
READ of size 2 at 0x61600000ec80 thread T0
#0 0x561b14ea8543 in bit_wcs2len /home/seviezhou/libredwg/src/bits.c:1634
#1 0x561b145837d0 in dwg_decode_LTYPE_private /home/seviezhou/libredwg/src/dwg.spec:3018
#2 0x561b14f5906b in dwg_decode_LTYPE /home/seviezhou/libredwg/src/dwg.spec:2936
#3 0x561b14f5906b in dwg_decode_add_object /home/seviezhou/libredwg/src/decode.c:5660
#4 0x561b14f60d90 in read_2004_section_handles /home/seviezhou/libredwg/src/decode.c:2835
#5 0x561b14f60d90 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3671
#6 0x561b14f6f3db in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#7 0x561b14e6a1fc in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#8 0x561b14e67594 in main /home/seviezhou/libredwg/programs/dwg2dxf.c:258
#9 0x7fdefebffb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#10 0x561b14e68689 in _start (/home/seviezhou/libredwg/programs/dwg2dxf+0xa4b689)
0x61600000ec81 is located 0 bytes to the right of 513-byte region [0x61600000ea80,0x61600000ec81)
allocated by thread T0 here:
#0 0x7fdeff4057aa in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x987aa)
#1 0x561b14ea4348 in bit_read_TF /home/seviezhou/libredwg/src/bits.c:1444
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/seviezhou/libredwg/src/bits.c:1634 bit_wcs2len
Shadow bytes around the buggy address:
0x0c2c7fff9d40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fff9d50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9d60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9d70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9d80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c2c7fff9d90:[01]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fff9da0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c7fff9db0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9dc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9dd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c2c7fff9de0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
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
==15425==ABORTING
```
## POC
[heap-buffer-overflow-bit_wcs2len-bits-1634.zip](https://github.com/LibreDWG/libredwg/files/5006918/heap-buffer-overflow-bit_wcs2len-bits-1634.zip)
|
A heap buffer overflow in bit_wcs2len at bits.c:1634
|
https://api.github.com/repos/LibreDWG/libredwg/issues/255/comments
| 1 |
2020-07-31T12:13:06Z
|
2020-08-01T09:34:29Z
|
https://github.com/LibreDWG/libredwg/issues/255
| 669,753,229 | 255 |
[
"LibreDWG",
"libredwg"
] |
I git cloned this reporitory. As per README, I tried doing
`$ sh ./autogen.sh`
I get an error 'autoreconf not found' at line 24
If I ignore this and go to next line, I cannot find 'configure' in the folder.
Any help is greatly appreciated.
|
Installation issues
|
https://api.github.com/repos/LibreDWG/libredwg/issues/254/comments
| 2 |
2020-07-31T10:58:03Z
|
2020-08-01T07:12:23Z
|
https://github.com/LibreDWG/libredwg/issues/254
| 669,692,759 | 254 |
[
"LibreDWG",
"libredwg"
] |
## System info
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [aee0ea](https://github.com/LibreDWG/libredwg/commit/aee0ea1f52ef9603b981362c83b3fec324ebb199))
## Configure
CFLAGS="-g -fsanitize=address" LDFLAGS="-fsanitize=address" ./configure
## Command line
./programs/dwg2dxf -b -m ./heap-buffer-overflow-bit_read_RC-bits-316 -o /dev/null
## AddressSanitizer output
```
=================================================================
==28757==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60e00000df20 at pc 0x55a53756d968 bp 0x7ffebfbfff60 sp 0x7ffebfbfff50
READ of size 1 at 0x60e00000df20 thread T0
#0 0x55a53756d967 in bit_read_RC /home/seviezhou/libredwg/src/bits.c:316
#1 0x55a53756d967 in bit_read_RS /home/seviezhou/libredwg/src/bits.c:376
#2 0x55a53756d967 in bit_read_RL /home/seviezhou/libredwg/src/bits.c:421
#3 0x55a53754baf5 in dwg_bmp /home/seviezhou/libredwg/src/dwg.c:537
#4 0x55a537648399 in read_2004_section_preview /home/seviezhou/libredwg/src/decode.c:3480
#5 0x55a537648399 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3674
#6 0x55a53764f3db in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#7 0x55a53754a1fc in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#8 0x55a537547594 in main /home/seviezhou/libredwg/programs/dwg2dxf.c:258
#9 0x7f5d7cb4db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#10 0x55a537548689 in _start (/home/seviezhou/libredwg/programs/dwg2dxf+0xa4b689)
0x60e00000df20 is located 0 bytes to the right of 160-byte region [0x60e00000de80,0x60e00000df20)
allocated by thread T0 here:
#0 0x7f5d7d3537aa in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x987aa)
#1 0x55a5375b0803 in read_2004_compressed_section /home/seviezhou/libredwg/src/decode.c:2424
#2 0x55a53814c56a (/home/seviezhou/libredwg/programs/dwg2dxf+0x164f56a)
SUMMARY: AddressSanitizer: heap-buffer-overflow /home/seviezhou/libredwg/src/bits.c:316 bit_read_RC
Shadow bytes around the buggy address:
0x0c1c7fff9b90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1c7fff9ba0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1c7fff9bb0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1c7fff9bc0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1c7fff9bd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c1c7fff9be0: 00 00 00 00[fa]fa fa fa fa fa fa fa 00 00 00 00
0x0c1c7fff9bf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c1c7fff9c00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1c7fff9c10: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1c7fff9c20: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c1c7fff9c30: 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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
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
==28757==ABORTING
```
## POC
[heap-buffer-overflow-bit_read_RC-bits-316.zip](https://github.com/LibreDWG/libredwg/files/5006510/heap-buffer-overflow-bit_read_RC-bits-316.zip)
|
A heap buffer overflow in bit_read_RC at bits.c:316
|
https://api.github.com/repos/LibreDWG/libredwg/issues/253/comments
| 0 |
2020-07-31T10:27:37Z
|
2020-08-01T09:34:29Z
|
https://github.com/LibreDWG/libredwg/issues/253
| 669,666,662 | 253 |
[
"LibreDWG",
"libredwg"
] |
## System info:
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [aee0ea](https://github.com/LibreDWG/libredwg/commit/aee0ea1f52ef9603b981362c83b3fec324ebb199))
## Command line
./programs/dwg2dxf -b -m ./heap-buffer-overflow-appinfo_private-decode-2993 -o /dev/null
## AddressSanitizer output
```
Reading DWG file ./heap-buffer-overflow-appinfo_private-decode-2993
=================================================================
==50338==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000c436 at pc 0x7f19fcaa3676 bp 0x7ffc0845d750 sp 0x7ffc0845cef8
READ of size 12 at 0x60200000c436 thread T0
#0 0x7f19fcaa3675 in __interceptor_memcmp (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x77675)
#1 0x56136d532338 in appinfo_private /home/seviezhou/libredwg/src/decode.c:2993
#2 0x56136d532338 in read_2004_section_appinfo /home/seviezhou/libredwg/src/decode.c:3023
#3 0x56136d532338 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3675
#4 0x56136d53e3db in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#5 0x56136d4391fc in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#6 0x56136d436594 in main /home/seviezhou/libredwg/programs/dwg2dxf.c:258
#7 0x7f19fc2beb96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#8 0x56136d437689 in _start (/home/seviezhou/libredwg/programs/dwg2dxf+0xa4b689)
0x60200000c436 is located 0 bytes to the right of 6-byte region [0x60200000c430,0x60200000c436)
allocated by thread T0 here:
#0 0x7f19fcac4612 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.2+0x98612)
#1 0x56136d47a234 in bit_read_TU16 /home/seviezhou/libredwg/src/bits.c:1878
#2 0x29d (<unknown module>)
SUMMARY: AddressSanitizer: heap-buffer-overflow ??:0 __interceptor_memcmp
Shadow bytes around the buggy address:
0x0c047fff9830: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9840: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9850: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9860: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff9870: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c047fff9880: fa fa fa fa fa fa[06]fa fa fa 04 fa fa fa 00 fa
0x0c047fff9890: fa fa 00 fa fa fa 00 fa fa fa 04 fa fa fa 00 fa
0x0c047fff98a0: fa fa 04 fa fa fa 00 fa fa fa 00 fa fa fa 00 fa
0x0c047fff98b0: fa fa 02 fa fa fa 00 fa fa fa 00 fa fa fa 00 fa
0x0c047fff98c0: fa fa 00 fa fa fa 00 06 fa fa 00 fa fa fa 00 fa
0x0c047fff98d0: fa fa 00 fa fa fa 00 fa fa fa 00 00 fa fa 00 02
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
Heap right redzone: fb
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack partial redzone: f4
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
==50338==ABORTING
```
## POC
[heap-buffer-overflow-appinfo_private-decode-2993.zip](https://github.com/LibreDWG/libredwg/files/5006069/heap-buffer-overflow-appinfo_private-decode-2993.zip)
|
A heap buffer overflow in appinfo_private at decode.c:2993
|
https://api.github.com/repos/LibreDWG/libredwg/issues/252/comments
| 0 |
2020-07-31T08:58:03Z
|
2020-08-01T09:34:29Z
|
https://github.com/LibreDWG/libredwg/issues/252
| 669,586,008 | 252 |
[
"LibreDWG",
"libredwg"
] |
## System info:
Ubuntu X64, gcc (Ubuntu 5.5.0-12ubuntu1), dwg2dxf (latest master [aee0ea](https://github.com/LibreDWG/libredwg/commit/aee0ea1f52ef9603b981362c83b3fec324ebb199))
## Command line
./programs/dwg2dxf -b -m ./SEGV-check_POLYLINE_handles-decode-5110 -o /dev/null
## Output
```
Reading DWG file ./crashes/SEGV-check_POLYLINE_handles-decode-5110
Warning: checksum: 0x28751255 (calculated) mismatch
ERROR: Invalid EED size 59410 > 5
ERROR: bit_read_RC buffer overflow at 11
ERROR: bit_read_RC buffer overflow at 11
Warning: check_CRC mismatch 4410-4424 = 14: D8BC <=> C37B
Warning: Unstable Class object 504 TABLESTYLE (0xfff) 42/0
Warning: TODO TABLESTYLE r2010+ missing fields
Warning: Unstable Class object 505 MATERIAL (0x481) 45/0
Warning: Unstable Class object 505 MATERIAL (0x481) 46/0
Warning: Unstable Class object 505 MATERIAL (0x481) 47/0
ERROR: Invalid object handle 0.0.0 at pos @2.2
ERROR: bit_read_RC buffer overflow at 54
ERROR: bit_read_RC buffer overflow at 54
ERROR: bit_read_RC buffer overflow at 54
ERROR: bit_read_RC buffer overflow at 54
ERROR: bit_read_RC buffer overflow at 54
Warning: Wrong POLYLINE.layer 0
Warning: POLYLINE.layer is vertex[0] 10, shift em, NULL seqend
Segmentation fault (core dumped)
```
## AddressSanitizer output
```
ASAN:SIGSEGV
=================================================================
==31426==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x55638c2df408 bp 0x000000000004 sp 0x7ffd7da9bd40 T0)
#0 0x55638c2df407 in check_POLYLINE_handles /home/seviezhou/libredwg/src/decode.c:5110
#1 0x55638cd140de in dwg_decode_add_object /home/seviezhou/libredwg/src/decode.c:5514
#2 0x55638cd20d90 in read_2004_section_handles /home/seviezhou/libredwg/src/decode.c:2835
#3 0x55638cd20d90 in decode_R2004 /home/seviezhou/libredwg/src/decode.c:3671
#4 0x55638cd2f3db in dwg_decode /home/seviezhou/libredwg/src/decode.c:242
#5 0x55638cc2a1fc in dwg_read_file /home/seviezhou/libredwg/src/dwg.c:251
#6 0x55638cc27594 in main /home/seviezhou/libredwg/programs/dwg2dxf.c:258
#7 0x7f8cf6f20b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#8 0x55638cc28689 in _start (/home/seviezhou/libredwg/programs/dwg2dxf+0xa4b689)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/seviezhou/libredwg/src/decode.c:5110 check_POLYLINE_handles
==31426==ABORTING
```
## POC
[SEGV-check_POLYLINE_handles-decode-5110.zip](https://github.com/LibreDWG/libredwg/files/5006038/SEGV-check_POLYLINE_handles-decode-5110.zip)
|
A Segmentation fault error in check_POLYLINE_handles at decode.c:5110
|
https://api.github.com/repos/LibreDWG/libredwg/issues/251/comments
| 0 |
2020-07-31T08:53:01Z
|
2020-08-01T09:34:28Z
|
https://github.com/LibreDWG/libredwg/issues/251
| 669,581,382 | 251 |
[
"LibreDWG",
"libredwg"
] |
I'm trying to run the master version libredwg on ubuntu18.04, but when I run the autogen.sh , it outputs some error:
++ rm -rf autom4te.cache config.status
++ test -d .git -a -f build-aux/git-version-gen
++ git fetch --tags
++ rm .tarball-version
rm: cannot remove '.tarball-version': No such file or directory
+++ build-aux/git-version-gen .tarball-version
++ v=
++ echo
++ echo
++ set -e
++ autoreconf --install --symlink -I m4
build-aux/git-version-gen: WARNING: .tarball-version is missing or damaged
configure.ac:22: error: AC_INIT should be called with package and version arguments
/usr/share/aclocal-1.15/init.m4:29: AM_INIT_AUTOMAKE is expanded from...
configure.ac:22: the top level
autom4te: /usr/bin/m4 failed with exit status: 1
aclocal: error: echo failed with exit status: 1
autoreconf: aclocal failed with exit status: 1
|
autogen.sh output error
|
https://api.github.com/repos/LibreDWG/libredwg/issues/250/comments
| 2 |
2020-07-19T01:53:41Z
|
2020-07-19T09:45:22Z
|
https://github.com/LibreDWG/libredwg/issues/250
| 660,512,631 | 250 |
[
"LibreDWG",
"libredwg"
] |
LibreDWG "read_2004_compressed_section" function heap overflow vulnerability
Description:
There is a heap overflow bug in "read_2004_compressed_section" function at libredwg-0.10.1/src/decode.c:2379:11
An attacker can exploit this bug to cause a Denial of Service (DoS) by submitting a dwg file.
This bug is caused by the following dangerous memcpy calling in read_2004_compressed_section function : line 2379
memcpy (&decomp[i * info->size], &dat->chain[address + es.fields.address + 32], info->size);
We used AddressSanitizer instrumented in LibreDWG and triggered this bug, the asan output as follows:
\=================================================================
==1349==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000034440 at pc 0x0000004e80ac bp 0x7ffdbb939850 sp 0x7ffdbb939000
WRITE of size 192 at 0x611000034440 thread T0
#0 0x4e80ab in __asan_memcpy /root/Download/llvm-8.0.0.src/projects/compiler-rt-8.0.0.src/lib/asan/asan_interceptors_memintrinsics.cc:23
#1 0x7f84c6f4dbee in read_2004_compressed_section /root/libredwg-0.10.1/src/decode.c:2379:11
#2 0x7f84c6ea713d in read_2004_section_preview /root/libredwg-0.10.1/src/decode.c:2778:11
#3 0x7f84c6ea713d in decode_R2004 /root/libredwg-0.10.1/src/decode.c:2965
#4 0x7f84c6e80d4d in dwg_decode /root/libredwg-0.10.1/src/decode.c
#5 0x7f84c6e6122f in dwg_read_file /root/libredwg-0.10.1/src/dwg.c:211:11
#6 0x52c2fd in main /root/libredwg-0.10.1/programs/dwg2SVG.c:568:11
#7 0x7f84c5c89b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#8 0x41b209 in _start (/root/libredwg-0.10.1/programs/.libs/dwg2SVG+0x41b209)
0x611000034440 is located 0 bytes to the right of 256-byte region [0x611000034340,0x611000034440)
allocated by thread T0 here:
#0 0x4e97ff in calloc /root/Download/llvm-8.0.0.src/projects/compiler-rt-8.0.0.src/lib/asan/asan_malloc_linux.cc:155
#1 0x7f84c6f4ce62 in read_2004_compressed_section /root/libredwg-0.10.1/src/decode.c:2289:26
#2 0x7f84c6ea713d in read_2004_section_preview /root/libredwg-0.10.1/src/decode.c:2778:11
#3 0x7f84c6ea713d in decode_R2004 /root/libredwg-0.10.1/src/decode.c:2965
#4 0x7f84c6e80d4d in dwg_decode /root/libredwg-0.10.1/src/decode.c
#5 0x7f84c6e6122f in dwg_read_file /root/libredwg-0.10.1/src/dwg.c:211:11
#6 0x52c2fd in main /root/libredwg-0.10.1/programs/dwg2SVG.c:568:11
#7 0x7f84c5c89b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
SUMMARY: AddressSanitizer: heap-buffer-overflow /root/Download/llvm-8.0.0.src/projects/compiler-rt-8.0.0.src/lib/asan/asan_interceptors_memintrinsics.cc:23 in __asan_memcpy
Shadow bytes around the buggy address:
0x0c227fffe830: 00 00 00 00 00 fa fa fa fa fa fa fa fa fa fa fa
0x0c227fffe840: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c227fffe850: 00 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa
0x0c227fffe860: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c227fffe870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c227fffe880: 00 00 00 00 00 00 00 00[fa]fa fa fa fa fa fa fa
0x0c227fffe890: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c227fffe8a0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c227fffe8b0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c227fffe8c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c227fffe8d0: 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
Shadow gap: cc
==1349==ABORTING
Then, we used GDB to debug this bug, the GDB outputs:
GDB
[----------------------------------registers-----------------------------------]
RAX: 0xffffffffc46 --> 0x0
RBX: 0x7fffffffd840 --> 0x62c000010200 --> 0x17022e0255800001
RCX: 0x7ffff6cd0ba4 (<read_2004_compressed_section+5060>: dec DWORD PTR [rbx+rcx*4+0x73])
RDX: 0xc0
RSI: 0x7ffff7e1ce60 --> 0x4164550000075130
RDI: 0x611000034400 --> 0x0
RBP: 0x7fffffffd9b0 --> 0x7fffffffdf90 --> 0x7fffffffe130 --> 0x7fffffffe350 --> 0x7fffffffe450 --> 0x532570 (<__libc_csu_init>: push r15)
RSP: 0x7fffffffd7e0 --> 0x41b58ab3
RIP: 0x7ffff6cd0bea (<read_2004_compressed_section+5130>: call 0x7ffff6be3460 <__asan_memcpy@plt>)
R8 : 0x1c37d
R9 : 0x1
R10: 0x0
R11: 0x611000034340 --> 0x666e497070410010
R12: 0x660
R13: 0xc340000026a --> 0x0
R14: 0x611000034400 --> 0x0
R15: 0x7ffff7e1ce60 --> 0x4164550000075130
EFLAGS: 0x206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
0x7ffff6cd0be0 <read_2004_compressed_section+5120>: mov rdi,r14
0x7ffff6cd0be3 <read_2004_compressed_section+5123>: mov rsi,r15
0x7ffff6cd0be6 <read_2004_compressed_section+5126>: mov rdx,QWORD PTR [rbx+0x68]
=> 0x7ffff6cd0bea <read_2004_compressed_section+5130>: call 0x7ffff6be3460 <__asan_memcpy@plt>
0x7ffff6cd0bef <read_2004_compressed_section+5135>: cmp BYTE PTR [r13+0x7fff8000],0x0
0x7ffff6cd0bf7 <read_2004_compressed_section+5143>: jne 0x7ffff6cd1377 <read_2004_compressed_section+7063>
0x7ffff6cd0bfd <read_2004_compressed_section+5149>: mov rdi,QWORD PTR [rbx+0xb8]
0x7ffff6cd0c04 <read_2004_compressed_section+5156>: mov rax,rdi
Guessed arguments:
arg[0]: 0x611000034400 --> 0x0
arg[1]: 0x7ffff7e1ce60 --> 0x4164550000075130
arg[2]: 0xc0
[------------------------------------stack-------------------------------------]
0000| 0x7fffffffd7e0 --> 0x41b58ab3
0008| 0x7fffffffd7e8 --> 0x7ffff78e4d61 ("1 32 32 7 es:2253")
0016| 0x7fffffffd7f0 --> 0x7ffff6ccf7e0 (<read_2004_compressed_section>: push rbp)
0024| 0x7fffffffd7f8 --> 0x7fffffffdac0 --> 0x110c
0032| 0x7fffffffd800 --> 0xa4163043b --> 0x0
0040| 0x7fffffffd808 --> 0xa000000080 --> 0x0
0048| 0x7fffffffd810 --> 0x80
0056| 0x7fffffffd818 --> 0x7a9012f11adc178b
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Breakpoint 3, 0x00007ffff6cd0bea in read_2004_compressed_section (dat=0x7fffffffe230, dwg=<optimized out>, sec_dat=0x7fffffffd9e0, section_type=0x1) at decode.c:2379
2379 memcpy (&decomp[i * info->size],
gdb-peda$ c
Continuing.
\=================================================================
==3250==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000034440 at pc 0x0000004e80ac bp 0x7fffffffd7d0 sp 0x7fffffffcf80
WRITE of size 192 at 0x611000034440 thread T0
[New process 3276]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 3276 is executing new program: /opt/llvm/bin/llvm-symbolizer
Error in re-setting breakpoint 2: No symbol table is loaded. Use the "file" command.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x52c2f9
Cannot insert breakpoint 3.
Cannot access memory at address 0x7ffff6cd0bea
We ensured there is a heap overflow vulnerability because of the dangerous using of memcpy function, attacker can use this bug to finish a DoS attack.
You can reproduce this heap overflow vulnerability by the follow step:
./dwg2SVG [PoC_libreDWG_heapoverflow_read_2004_compressed_section_line2379](https://github.com/yangjiageng/PoC/blob/master/PoC_libreDWG_heapoverflow_read_2004_compressed_section_line2379)
|
LibreDWG "read_2004_compressed_section" function heap overflow vulnerability
|
https://api.github.com/repos/LibreDWG/libredwg/issues/249/comments
| 5 |
2020-07-18T12:55:27Z
|
2020-07-21T16:38:01Z
|
https://github.com/LibreDWG/libredwg/issues/249
| 660,135,065 | 249 |
[
"LibreDWG",
"libredwg"
] |
LibreDWG "read_system_page" function heap overflow vulnerability
Description:
There is a heap overflow bug in "read_system_page" function at libredwg-0.10.1/src/decode_r2007.c:666:5
An attacker can exploit this bug to cause a Denial of Service (DoS) by submitting a dwg file.
This bug is caused by the following dangerous memcpy calling in read_system_page function: line 666
if (size_comp < size_uncomp)
error = decompress_r2007 (data, size_uncomp, pedata, MIN (pedata_size, size_comp));
else
memcpy (data, pedata, size_uncomp);
free (pedata);
We used AddressSanitizer instrumented in LibreDWG and triggered this bug, the asan output as follows:
==2593==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000031 at pc 0x0000004e7e12 bp 0x7ffd91a390c0 sp 0x7ffd91a38870
READ of size 96 at 0x602000000031 thread T0
#0 0x4e7e11 in __asan_memcpy /root/Download/llvm-8.0.0.src/projects/compiler-rt-8.0.0.src/lib/asan/asan_interceptors_memintrinsics.cc:23
#1 0x7f131338293e in read_system_page /root/libredwg-0.10.1/src/decode_r2007.c:666:5
#2 0x7f131336bc15 in read_pages_map /root/libredwg-0.10.1/src/decode_r2007.c:1014:10
#3 0x7f131336bc15 in read_r2007_meta_data /root/libredwg-0.10.1/src/decode_r2007.c:1814
#4 0x7f1312f9bc84 in decode_R2007 /root/libredwg-0.10.1/src/decode.c:3016:11
#5 0x7f1312f9bc84 in dwg_decode /root/libredwg-0.10.1/src/decode.c:241
#6 0x7f1312f7922f in dwg_read_file /root/libredwg-0.10.1/src/dwg.c:211:11
#7 0x52c287 in main /root/libredwg-0.10.1/programs/dwg2dxf.c:255:15
#8 0x7f1311da1b96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)
#9 0x41add9 in _start (/root/libredwg-0.10.1/programs/.libs/dwg2dxf+0x41add9)
0x602000000031 is located 0 bytes to the right of 1-byte region [0x602000000030,0x602000000031)
allocated by thread T0 here:
#0 0x4e93cf in calloc /root/Download/llvm-8.0.0.src/projects/compiler-rt-8.0.0.src/lib/asan/asan_malloc_linux.cc:155
#1 0x7f131337a0a6 in decode_rs /root/libredwg-0.10.1/src/decode_r2007.c:590:34
SUMMARY: AddressSanitizer: heap-buffer-overflow /root/Download/llvm-8.0.0.src/projects/compiler-rt-8.0.0.src/lib/asan/asan_interceptors_memintrinsics.cc:23 in __asan_memcpy
Shadow bytes around the buggy address:
0x0c047fff7fb0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fc0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fd0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7fe0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c047fff7ff0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c047fff8000: fa fa 00 00 fa fa[01]fa fa fa fa fa fa fa fa fa
0x0c047fff8010: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8020: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8030: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8040: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c047fff8050: 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
Shadow gap: cc
==2593==ABORTING
Then, we used GDB to debug this bug, the GDB outputs:
GDB
//----------------------------------registers-----------------------------------
RAX: 0x7ffff2c6a1e0 --> 0x7ffff6fed930 (<read_system_page+976>: dec DWORD PTR [rcx+rcx*4-0x1])
RBX: 0x7f
RCX: 0x0
RDX: 0x60 ('\`')\
RSI: 0x602000000070 --> 0x0
RDI: 0x608000000020 --> 0x0
RBP: 0x0
RSP: 0x7fffffffc410 --> 0xffffffff866 --> 0x0
RIP: 0x7ffff6fed93a (<read_system_page+986>: call 0x7ffff6be3460 <__asan_memcpy@plt>)
R8 : 0x1c2e6
R9 : 0x2
R10: 0x28 ('(')
R11: 0x602000000060 --> 0x2ffffff00000002
R12: 0x602000000070 --> 0x0
R13: 0x608000000080 --> 0x0
R14: 0x60 ('\`')
R15: 0x608000000020 --> 0x0
EFLAGS: 0x202 (carry parity adjust zero sign trap INTERRUPT direction overflow)
//-------------------------------------code-------------------------------------
0x7ffff6fed931 <read_system_page+977>: mov rdi,r15
0x7ffff6fed934 <read_system_page+980>: mov rsi,r12
0x7ffff6fed937 <read_system_page+983>: mov rdx,r14
=> 0x7ffff6fed93a <read_system_page+986>: call 0x7ffff6be3460 <__asan_memcpy@plt>
0x7ffff6fed93f <read_system_page+991>: mov rdi,r12
0x7ffff6fed942 <read_system_page+994>: call 0x7ffff6be25e0 <free@plt>
0x7ffff6fed947 <read_system_page+999>: jmp 0x7ffff6fed99a <read_system_page+1082>
0x7ffff6fed949 <read_system_page+1001>: lea rdi,[rip+0xd9a81c] # 0x7ffff7d8816c
Guessed arguments:
arg[0]: 0x608000000020 --> 0x0
arg[1]: 0x602000000070 --> 0x0
arg[2]: 0x60 ('\`')
//------------------------------------stack-------------------------------------
0000| 0x7fffffffc410 --> 0xffffffff866 --> 0x0
0008| 0x7fffffffc418 --> 0x7fffffffd098 --> 0x2f65f
0016| 0x7fffffffc420 --> 0x7fffffffd090 --> 0x7ffff7e18800 --> 0x313230314341 ('AC1021')
0024| 0x7fffffffc428 --> 0xffffffffa13 --> 0x0
0032| 0x7fffffffc430 --> 0x7f
0040| 0x7fffffffc438 --> 0x60 ('\`')
0048| 0x7fffffffc440 --> 0xffffffffffffff91
0056| 0x7fffffffc448 --> 0x7fffffffcc80 --> 0xf
//------------------------------------------------------------------------------
Legend: code, data, rodata, value
0x00007ffff6fed93a 666 memcpy (data, pedata, size_uncomp);
gdb-peda$
ERROR: AddressSanitizer: heap-buffer-overflow on address 0x602000000071 at pc 0x0000004e7e12 bp 0x7fffffffc400 sp 0x7fffffffbbb0
READ of size 96 at 0x602000000071 thread T0
[New process 3499]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
process 3499 is executing new program: /opt/llvm/bin/llvm-symbolizer
Error in re-setting breakpoint 2: No symbol table is loaded. Use the "file" command.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0x52c283
We ensured there is a heap overflow vulnerability because of the dangerous using of memcpy function, attacker can use this bug to finish a DoS attack.
You can reproduce this heap overflow vulnerability by the follow step:
/dwg2dxf -m -b [PoC_libreDWG_heapoverflow_decode_r2007_line666](https://github.com/yangjiageng/PoC/blob/master/PoC_libreDWG_heapoverflow_decode_r2007_line666)
|
LibreDWG "read_system_page" function heap overflow vulnerability
|
https://api.github.com/repos/LibreDWG/libredwg/issues/248/comments
| 6 |
2020-07-18T12:19:50Z
|
2020-07-21T13:02:44Z
|
https://github.com/LibreDWG/libredwg/issues/248
| 660,117,543 | 248 |
[
"LibreDWG",
"libredwg"
] |
...which leads to the failure of configure.sh. Adding the version number solves it (that corresponds to `autoconf --version`), as can be seen below.
```
AC_INIT([LibreDWG],
[2.69],
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
[[email protected]],,
[https://savannah.gnu.org/projects/libredwg/])
```
I don't think this is intended, and should be solved?
|
AC_INIT missing version argument in configure.sh
|
https://api.github.com/repos/LibreDWG/libredwg/issues/247/comments
| 1 |
2020-07-17T12:49:58Z
|
2020-07-18T05:55:03Z
|
https://github.com/LibreDWG/libredwg/issues/247
| 659,230,390 | 247 |
[
"LibreDWG",
"libredwg"
] |
in work, HEADER and CLASSES already work
|
Binary DXF
|
https://api.github.com/repos/LibreDWG/libredwg/issues/246/comments
| 0 |
2020-07-15T14:21:24Z
|
2020-07-15T14:21:38Z
|
https://github.com/LibreDWG/libredwg/issues/246
| 657,390,095 | 246 |
[
"LibreDWG",
"libredwg"
] |
We really need the encoding of the string being stored, to avoid unneeded conversions (injson/indxf e.g. r2007 -> r2000), and while we are there we can also store the length then.
```
typedef struct _dwg_string {
char *str;
BITCODE_RS len;
// encoding
BITCODE_RS cp; // 30: ANSI_1252, 43: UTF-16, 0: UTF-8. max: 44
} Dwg_String;
```
cp being dwg->header.codepage (eg 30) or 0: UTF8 (indxf + injson) or 43 UTF-16 (TU) or CP_DWG (lookup dwg->header.codepage).
Then we can add iconv conversions also. So far only US_ASCII and Latin-1 (cp 30) conversions are done properly.
But better embed the string at the end of the string and pass around the ptr to this.
```
#pragma pack(1)
typedef struct _dwg_string {
BITCODE_RS len;
// encoding
BITCODE_RS cp; // 30: ANSI_1252, 43: UTF-16, 0: UTF-8. max: 44
char* str[];
} Dwg_String;
typedef char *BITCODE_T;
BITCODE_T *tstr_new (char* str)
{
Dwg_String *tstr = malloc (9 + strlen (str));
tstr->len = strlen (str);
return &tstr->str;
}
```
------
The other idea is to use UTF-8 everywhere and convert on the fly.
|
maybe convert strings to a struct
|
https://api.github.com/repos/LibreDWG/libredwg/issues/245/comments
| 1 |
2020-07-11T17:06:47Z
|
2021-02-22T19:15:37Z
|
https://github.com/LibreDWG/libredwg/issues/245
| 655,244,303 | 245 |
[
"LibreDWG",
"libredwg"
] |
the last remaining 0.11 blocker.
acad crashes on opening dxf2dwg example_2004.dxf saved as r2000 DWG.
all other versions can now be opened fine, with only minor problems.
Note that this is no regression. This generated dxf2dwg could never be opened before. But if it's fixable within a week do so. Earlier and later versions can all be opened fine.
|
dxf-check example_2004 acad dwg open crash
|
https://api.github.com/repos/LibreDWG/libredwg/issues/244/comments
| 3 |
2020-07-11T09:24:13Z
|
2020-07-31T15:33:54Z
|
https://github.com/LibreDWG/libredwg/issues/244
| 655,171,903 | 244 |
[
"LibreDWG",
"libredwg"
] |
create vertex and attribs vectors in in_postprocess_SEQEND.
needed for write2004
|
encode r2004+: converted owned linked list to vector
|
https://api.github.com/repos/LibreDWG/libredwg/issues/243/comments
| 1 |
2020-07-11T09:18:16Z
|
2020-07-15T14:20:09Z
|
https://github.com/LibreDWG/libredwg/issues/243
| 655,171,065 | 243 |
[
"LibreDWG",
"libredwg"
] |
When reading or writing files rather use mmap() than memory buffers to save memory. DWG's can get quite big and we already have to keep a copy of the Dwg_Data structure in memory, plus it's input dat and output dat buffers.
problems: compat lib needed on windows, there are a few. But basically we just need two calls, which are trivial to implement. I already wrote that for some perl mmap library some decades ago.
|
switch to mmap for less memory
|
https://api.github.com/repos/LibreDWG/libredwg/issues/242/comments
| 1 |
2020-07-08T06:03:33Z
|
2020-11-05T08:04:47Z
|
https://github.com/LibreDWG/libredwg/issues/242
| 652,999,333 | 242 |
[
"LibreDWG",
"libredwg"
] |
I have a dwg file, this file contains a lot of Chinese characters.
If I convert all the Chinese characters into vector lines(eg. line, polyline, spline), it will be extremely slow.
I heard that other CAD software uses ttf font to process, not vector lines.
But abot how to write TEXT with ttf font in CAD software, I have no experience in this area, can you provide a link to related knowledge or some ideas?
Thank you very much.
|
How to write TEXT with ttf font in CAD software?
|
https://api.github.com/repos/LibreDWG/libredwg/issues/240/comments
| 1 |
2020-07-03T04:08:43Z
|
2020-07-08T05:58:52Z
|
https://github.com/LibreDWG/libredwg/issues/240
| 650,328,956 | 240 |
[
"LibreDWG",
"libredwg"
] |
@lorenz: we currently see some python errors:
ImportError: /home/conda/feedstock_root/build_artifacts/libredwg_1592928860281/_test_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placeho/lib/python3.6/site-packages/_LibreDWG.so: undefined symbol: dwg_setup_PERSUBENTMGR
maybe you can have a look.
https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=177575&view=results
worked ok with 0.10.1.3288
copied over from #195
|
python bindings started to fail with 0.10.1.3549: dwg_setup_PERSUBENTMGR
|
https://api.github.com/repos/LibreDWG/libredwg/issues/239/comments
| 3 |
2020-06-26T10:08:05Z
|
2020-06-26T17:15:47Z
|
https://github.com/LibreDWG/libredwg/issues/239
| 646,156,329 | 239 |
[
"LibreDWG",
"libredwg"
] |
I want to get my MTEXT's font name. my codes are as follows,
Dwg_Entity_MTEXT* text = obj->tio.entity->tio.MTEXT;
Dwg_Object_STYLE *style = text->style->obj->tio.object->tio.STYLE;
string stylename = style->font_file;
if(!RS_COMMON::is_str_utf8(style->font_file))
{
std::wstring_convert<std::codecvt_utf8<char16_t>,char16_t> ucs2conv;
stylename = ucs2conv.to_bytes((char16_t*)text->style->obj->name);
}
But I find the 'stylename ' is always one letter,such as 't' or other letter. I think it should be full font name, such as 'romans'.
Maybe there is some problems with my codes or with my understanding..
I need some helps, sincere thanks.
|
Another question, about font_file and bigfont_file in Dwg_Object_STYLE struct.
|
https://api.github.com/repos/LibreDWG/libredwg/issues/238/comments
| 3 |
2020-06-24T06:18:38Z
|
2020-06-24T06:33:05Z
|
https://github.com/LibreDWG/libredwg/issues/238
| 644,350,725 | 238 |
[
"LibreDWG",
"libredwg"
] |
I found Dwg_Entity_TEXT have rotation value(/*!< DXF 50 */), but can't find the rotation value in Dwg_Entity_MTEXT struct.
In Dwg_Entity_MTEXT struct, as follows,
BITCODE_BD *column_heights;/*!< DXF 50 */
The column_heights key use 'DXF 50', after testing, I find column_heights is not rotation.
so I want to know how to get rotation value in In Dwg_Entity_MTEXT struct.
|
How to get MText's rotation value
|
https://api.github.com/repos/LibreDWG/libredwg/issues/237/comments
| 2 |
2020-06-24T04:45:16Z
|
2020-06-24T06:22:56Z
|
https://github.com/LibreDWG/libredwg/issues/237
| 644,313,954 | 237 |
[
"LibreDWG",
"libredwg"
] |
I have a R2007 dwg file, I try to open it with LibreDWG API.
but 'dwg_read_file' fuction return 258:
'no THUMBNAIL Image Data' error return 2, and 'read_2007_section_appinfohistory' fuction return 256. LOG_INFO ("%s section not found\n", "AppInfoHistory").
I am not familiar with dwg file data structure. Does every R2007 dwg file have SECTION_APPINFOHISTORY keyword(or data structure)?
In addition, I noticed that for R2007 dwg, LibreDWG use decode_r2007.c to decode it separately, why other versions do not need to decode separately?
|
About SECTION_APPINFOHISTORY error.
|
https://api.github.com/repos/LibreDWG/libredwg/issues/236/comments
| 4 |
2020-06-22T07:45:02Z
|
2020-06-22T19:14:00Z
|
https://github.com/LibreDWG/libredwg/issues/236
| 642,837,850 | 236 |
[
"LibreDWG",
"libredwg"
] |
I found libreDWG can get "BYLAYER"/"BYBLOCK"/"CONTINUOUS" line type from dwg file. But i can't find others line type, such as "Dotted line"/"Dashed line tiny". How to get it?
if (!strcasecmp (pair->value.s, "BYLAYER"))
flags = 0;
if (!strcasecmp (pair->value.s, "BYBLOCK"))
flags = 1;
if (!strcasecmp (pair->value.s, "CONTINUOUS"))
flags = 2;
dwg_dynapi_common_set_value (
_obj, "ltype_flags", &flags, 0);
|
How to get line type, such as Dotted line, Dashed line tiny
|
https://api.github.com/repos/LibreDWG/libredwg/issues/235/comments
| 2 |
2020-06-21T01:11:24Z
|
2020-06-22T19:14:18Z
|
https://github.com/LibreDWG/libredwg/issues/235
| 642,473,575 | 235 |
[
"LibreDWG",
"libredwg"
] |
I parse a dwg file which has some entities in *Paper_Space. I want to get entities owner block
void printOwner(Dwg_Object* obj, Dwg_Data* dwg)
{
Dwg_Object *owner = NULL;
if (is_dwg_entity(obj->name) && obj->tio.entity->ownerhandle)
{
owner = dwg_resolve_handle(dwg, obj->tio.entity->ownerhandle->absolute_ref);
}
else if (is_dwg_object(obj->name) && obj->tio.object->ownerhandle)
{
owner = dwg_resolve_handle(dwg, obj->tio.object->ownerhandle->absolute_ref);
}
else
{
printf("owner_block=*Model_Space\n");
}
if (owner)
{
if (owner->type == DWG_TYPE_BLOCK_HEADER)
{
Dwg_Object_BLOCK_HEADER* bhr = owner->tio.object->tio.BLOCK_HEADER;
int needfree = 0;
char* szName = convertString(dwg->header.version, bhr->name, &needfree);// convert str use bit_convert_TU
printf("owner_block=%s\n", szName);
if (needfree)
free(szName);
}
}
}
But I found the entities in *Paper_Space will print "owner_block=*Model_Space".
How shoud I get the owner block of each entities.
Thank you.
|
How to get the owner block of each entities.
|
https://api.github.com/repos/LibreDWG/libredwg/issues/234/comments
| 2 |
2020-06-05T01:47:19Z
|
2020-06-22T01:46:18Z
|
https://github.com/LibreDWG/libredwg/issues/234
| 631,251,805 | 234 |
[
"LibreDWG",
"libredwg"
] |
config.log:
```
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by LibreDWG configure Usage: build-aux/git-version-gen OPTION... ./.tarball-version TAG-NORMALIZATION-SED-SCRIPT
Print a version string.
Options:
--prefix PREFIX prefix of git tags (default 'v')
--fallback VERSION
fallback version to use if "git --version" fails
--help display this help and exit
--version output version information and exit
```
Running without arguments will suffice in most cases.
which was
generated by GNU Autoconf 2.69. Invocation command line was
```
$ ./configure
## --------- ##
## Platform. ##
## --------- ##
hostname = gergul-centos-vm
uname -m = x86_64
uname -r = 3.10.0-1127.8.2.el7.x86_64
uname -s = Linux
uname -v = #1 SMP Tue May 12 16:57:42 UTC 2020
/usr/bin/uname -p = x86_64
/bin/uname -X = unknown
/bin/arch = x86_64
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /usr/local/bin
PATH: /usr/local/sbin
PATH: /usr/bin
PATH: /usr/sbin
PATH: /bin
PATH: /sbin
PATH: /home/gergul/.local/bin
PATH: /home/gergul/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:2875: checking for a BSD-compatible install
configure:2943: result: /usr/bin/install -c
configure:2954: checking whether build environment is sane
configure:3009: result: yes
configure:3160: checking for a thread-safe mkdir -p
configure:3199: result: /usr/bin/mkdir -p
configure:3206: checking for gawk
configure:3222: found /usr/bin/gawk
configure:3233: result: gawk
configure:3244: checking whether make sets $(MAKE)
configure:3266: result: yes
configure:3295: checking whether make supports nested variables
configure:3312: result: yes
configure:3462: checking whether make supports nested variables
configure:3479: result: yes
configure:3493: checking git version
configure:3495: result: Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
Print a version string.
Options:
--prefix PREFIX prefix of git tags (default v)
--fallback VERSION
fallback version to use if "git --version" fails
--help display this help and exit
--version output version information and exit
Running without arguments will suffice in most cases.
configure:3497: checking so version-info
configure:3499: result: 0:10:0
configure:3509: checking build system type
configure:3523: result: x86_64-unknown-linux-gnu
configure:3543: checking host system type
configure:3556: result: x86_64-unknown-linux-gnu
configure:3626: checking for gcc
configure:3642: found /usr/local/bin/gcc
configure:3653: result: gcc
configure:3882: checking for C compiler version
configure:3891: gcc --version >&5
gcc (GCC) 10.1.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:3902: $? = 0
configure:3891: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/10.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /opt/gcc-10.1.0/configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 10.1.0 (GCC)
configure:3902: $? = 0
configure:3891: gcc -V >&5
gcc: error: unrecognized command-line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:3902: $? = 1
configure:3891: gcc -qversion >&5
gcc: error: unrecognized command-line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:3902: $? = 1
configure:3922: checking whether the C compiler works
configure:3944: gcc conftest.c >&5
conftest.c:4:25: warning: missing terminating " character
4 | #define PACKAGE_VERSION "Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
| ^
conftest.c:5:1: error: unknown type name 'Print'; did you mean 'int'?
5 | Print a version string.
| ^~~~~
| int
conftest.c:5:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'version'
5 | Print a version string.
| ^~~~~~~
conftest.c:5:9: error: unknown type name 'version'
conftest.c:17:1: warning: missing terminating " character
17 | "
| ^
conftest.c:17:1: error: missing terminating " character
conftest.c:18:24: warning: missing terminating " character
18 | #define PACKAGE_STRING "LibreDWG Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
| ^
conftest.c:31:1: warning: missing terminating " character
31 | "
| ^
conftest.c:31:1: error: missing terminating " character
configure:3948: $? = 1
configure:3986: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "LibreDWG"
| #define PACKAGE_TARNAME "libredwg"
| #define PACKAGE_VERSION "Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
| Print a version string.
|
| Options:
|
| --prefix PREFIX prefix of git tags (default v)
| --fallback VERSION
| fallback version to use if "git --version" fails
|
| --help display this help and exit
| --version output version information and exit
|
| Running without arguments will suffice in most cases.
| "
| #define PACKAGE_STRING "LibreDWG Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
| Print a version string.
|
| Options:
|
| --prefix PREFIX prefix of git tags (default v)
| --fallback VERSION
| fallback version to use if "git --version" fails
|
| --help display this help and exit
| --version output version information and exit
|
| Running without arguments will suffice in most cases.
| "
| #define PACKAGE_BUGREPORT "[email protected]"
| #define PACKAGE_URL "https://savannah.gnu.org/projects/libredwg/"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:3991: error: in `/home/gergul/libredwg':
configure:3993: error: C compiler cannot create executables
See `config.log' for more details
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=x86_64-unknown-linux-gnu
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_PYTHON_VERSION_set=
ac_cv_env_PYTHON_VERSION_value=
ac_cv_env_PYTHON_set=
ac_cv_env_PYTHON_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_host=x86_64-unknown-linux-gnu
ac_cv_path_install='/usr/bin/install -c'
ac_cv_path_mkdir=/usr/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
am_cv_make_support_nested_variables=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
fallback version to use if "git --version" fails
fallback version to use if "git --version" fails
fallback version to use if "git --version" fails
--fallback VERSION
--fallback VERSION
--fallback VERSION
--help display this help and exit
--help display this help and exit
--help display this help and exit
--prefix PREFIX prefix of git tags (default v)
--prefix PREFIX prefix of git tags (default v)
--prefix PREFIX prefix of git tags (default v)
--version output version information and exit
--version output version information and exit
--version output version information and exit
'
'
'
ACLOCAL='${SHELL} /home/gergul/libredwg/build-aux/missing aclocal-1.14'
ALLOCA=''
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='$${TAR-tar}'
AM_BACKSLASH='\'
AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
AM_DEFAULT_VERBOSITY='0'
AM_LDFLAGS=''
AM_V='$(V)'
AR=''
AUTOCONF='${SHELL} /home/gergul/libredwg/build-aux/missing autoconf'
AUTOHEADER='${SHELL} /home/gergul/libredwg/build-aux/missing autoheader'
AUTOMAKE='${SHELL} /home/gergul/libredwg/build-aux/missing automake-1.14'
AWK='gawk'
AX_SWIG_PYTHON_CPPFLAGS=''
AX_SWIG_PYTHON_OPT=''
BASH='/bin/sh'
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CLANG_FORMAT=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DISABLE_BINDINGS_FALSE=''
DISABLE_BINDINGS_TRUE=''
DISABLE_DXF_FALSE=''
DISABLE_DXF_TRUE=''
DLLTOOL=''
DOXYGEN=''
DSYMUTIL=''
DUMPBIN=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_DEBUG_FALSE=''
ENABLE_DEBUG_TRUE=''
ENABLE_GCOV_FALSE=''
ENABLE_GCOV_TRUE=''
ENABLE_SHARED_FALSE=''
ENABLE_SHARED_TRUE=''
ENABLE_VALGRIND_drd=''
ENABLE_VALGRIND_helgrind=''
ENABLE_VALGRIND_memcheck=''
ENABLE_VALGRIND_sgcheck=''
EXEEXT=''
FGREP=''
GCOV=''
GCOV_CFLAGS=''
GCOV_LIBS=''
GREP=''
HAVE_ASAN=''
HAVE_C99=''
HAVE_DOXYGEN_FALSE=''
HAVE_DOXYGEN_TRUE=''
HAVE_INSRCDIR_FALSE=''
HAVE_INSRCDIR_TRUE=''
HAVE_JING_FALSE=''
HAVE_JING_TRUE=''
HAVE_JQ_FALSE=''
HAVE_JQ_TRUE=''
HAVE_LIBPS_FALSE=''
HAVE_LIBPS_TRUE=''
HAVE_MAKEINFO_FALSE=''
HAVE_MAKEINFO_TRUE=''
HAVE_MINGW_CROSS_FALSE=''
HAVE_MINGW_CROSS_TRUE=''
HAVE_MINGW_FALSE=''
HAVE_MINGW_TRUE=''
HAVE_PARALLEL_FALSE=''
HAVE_PARALLEL_TRUE=''
HAVE_PATCH_FALSE=''
HAVE_PATCH_TRUE=''
HAVE_PERL_FALSE=''
HAVE_PERL_TRUE=''
HAVE_PICAT_FALSE=''
HAVE_PICAT_TRUE=''
HAVE_PYTHON_FALSE=''
HAVE_PYTHON_TRUE=''
HAVE_RPMLINT_FALSE=''
HAVE_RPMLINT_TRUE=''
HAVE_SHELLCHECK_FALSE=''
HAVE_SHELLCHECK_TRUE=''
HAVE_SWIG_PERL_FALSE=''
HAVE_SWIG_PERL_TRUE=''
HAVE_SWIG_PYTHON_FALSE=''
HAVE_SWIG_PYTHON_TRUE=''
HAVE_TIMEOUT_FALSE=''
HAVE_TIMEOUT_TRUE=''
HAVE_WINE_FALSE=''
HAVE_WINE_TRUE=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
ISODATE='2020-05-27'
IS_RELEASE_FALSE=''
IS_RELEASE_TRUE=''
JING=''
JQ=''
JSON_SED_NAN=''
LD=''
LDFLAGS=''
LIBOBJS=''
LIBREDWG_SO_VERSION='0:10:0'
LIBS=''
LIBTOOL=''
LIPO=''
LN_S=''
LTEXEC=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/gergul/libredwg/build-aux/missing makeinfo'
MANIFEST_TOOL=''
MKDIR_P='/usr/bin/mkdir -p'
NM=''
NMEDIT=''
OBJDUMP=''
OBJEXT=''
OTOOL64=''
OTOOL=''
Options:
Options:
Options:
PACKAGE='libredwg'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_NAME='LibreDWG'
PACKAGE_STRING='LibreDWG Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
PACKAGE_TARNAME='libredwg'
PACKAGE_URL='https://savannah.gnu.org/projects/libredwg/'
PACKAGE_VERSION='Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
PARALLEL=''
PATCH=''
PATH_SEPARATOR=':'
PCRE2_CFLAGS=''
PCRE2_LIBS=''
PERL=''
PICAT=''
PYTHON=''
PYTHON_CPPFLAGS=''
PYTHON_EXEC_PREFIX=''
PYTHON_EXTRA_LDFLAGS=''
PYTHON_EXTRA_LIBS=''
PYTHON_LIBS=''
PYTHON_PLATFORM=''
PYTHON_PREFIX=''
PYTHON_SITE_PKG=''
PYTHON_VERSION=''
Print a version string.
Print a version string.
Print a version string.
RANLIB=''
RPMLINT=''
RUN_JING=''
Running without arguments will suffice in most cases.
Running without arguments will suffice in most cases.
Running without arguments will suffice in most cases.
SED=''
SET_MAKE=''
SHELL='/bin/sh'
SHELLCHECK=''
STRIP=''
SWIG=''
SWIG_LIB=''
TARBALL_VERSION_FILE='.tarball-version'
TIMEOUT=''
TIMEOUT_10=''
TIMEOUT_30=''
USE_WRITE_FALSE=''
USE_WRITE_TRUE=''
VALGRIND=''
VALGRIND_CHECK_RULES=''
VALGRIND_ENABLED=''
VALGRIND_ENABLED_FALSE=''
VALGRIND_ENABLED_TRUE=''
VALGRIND_SUPPRESSIONS=''
VALGRIND_SUPPRESSIONS_FILE=''
VERSION='Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
WARN_CFLAGS=''
WARN_SCANNERFLAGS=''
WINE=''
XML2_CFLAGS=''
XML2_LIBS=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_DUMPBIN=''
am__EXEEXT_FALSE=''
am__EXEEXT_TRUE=''
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__nodep=''
am__quote=''
am__tar='$${TAR-tar} chof - "$$tardir"'
am__untar='$${TAR-tar} xf -'
bindir='${exec_prefix}/bin'
build='x86_64-unknown-linux-gnu'
build_alias=''
build_cpu='x86_64'
build_os='linux-gnu'
build_vendor='unknown'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='x86_64-unknown-linux-gnu'
host_alias=''
host_cpu='x86_64'
host_os='linux-gnu'
host_vendor='unknown'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='${SHELL} /home/gergul/libredwg/build-aux/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
makeinfo_version=''
mandir='${datarootdir}/man'
mkdir_p='$(MKDIR_P)'
oldincludedir='/usr/include'
pdfdir='${docdir}'
pkgpyexecdir=''
pkgpythondir=''
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
pyexecdir=''
pythondir=''
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
valgrind_enabled_tools=''
valgrind_tools=''
with_perl_install=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
/* confdefs.h */
#define PACKAGE_NAME "LibreDWG"
#define PACKAGE_TARNAME "libredwg"
#define PACKAGE_VERSION "Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
Print a version string.
Options:
--prefix PREFIX prefix of git tags (default v)
--fallback VERSION
fallback version to use if "git --version" fails
--help display this help and exit
--version output version information and exit
Running without arguments will suffice in most cases.
"
#define PACKAGE_STRING "LibreDWG Usage: build-aux/git-version-gen OPTION... $srcdir/.tarball-version TAG-NORMALIZATION-SED-SCRIPT
Print a version string.
Options:
--prefix PREFIX prefix of git tags (default v)
--fallback VERSION
fallback version to use if "git --version" fails
--help display this help and exit
--version output version information and exit
Running without arguments will suffice in most cases.
"
#define PACKAGE_BUGREPORT "[email protected]"
#define PACKAGE_URL "https://savannah.gnu.org/projects/libredwg/"
configure: exit 77`
My automake version:
`automake (GNU automake) 1.14.1
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <[email protected]>
and Alexandre Duret-Lutz <[email protected]>.
```
Thanks.
|
./configure error.
|
https://api.github.com/repos/LibreDWG/libredwg/issues/233/comments
| 2 |
2020-05-27T01:19:53Z
|
2020-05-28T08:57:17Z
|
https://github.com/LibreDWG/libredwg/issues/233
| 625,303,887 | 233 |
[
"LibreDWG",
"libredwg"
] |
I was looking on the internet for an app that could convert DGW to PDF and found dwgread. I allready am using Ghostscript so it would be easy for me to convert the ps file to PDF.
But whenever I try dwgread complains that test.ps is an invalid file.
|
Does dwgread already support ps (postscript?)
|
https://api.github.com/repos/LibreDWG/libredwg/issues/231/comments
| 2 |
2020-04-29T11:53:21Z
|
2020-05-05T15:48:18Z
|
https://github.com/LibreDWG/libredwg/issues/231
| 608,996,111 | 231 |
[
"LibreDWG",
"libredwg"
] |
Create DXF and DXFB from JSON,DXF,DXFB and DWG into any format.
dwgwrite can only create r13-r2000, dxfwrite should create any supported version.
See branch `work/dxfwrite`. Current problem is that the dxf/json importers (OPTS_IN) don't create TU strings, just TV, even if the version is >= R_2007. A hack, because dwgwrite only can do R_2000 i.e. TV so far. TU was not needed. But decode does so.
Sooner or later we'll write r2007 DWG's also, but for now transforming utf8 (dxf/json) -> TU (r2007 dwg src) -> TV (dwg target) might be overkill. So we might need another version flag in the dwg->header: tu_string vs tv_string, which is needed for the importer already.
Need a massive version fixup, esp. for in_json.
|
dxfwrite (analog to dwgwrite)
|
https://api.github.com/repos/LibreDWG/libredwg/issues/230/comments
| 1 |
2020-04-18T06:41:01Z
|
2020-04-19T17:07:52Z
|
https://github.com/LibreDWG/libredwg/issues/230
| 602,392,923 | 230 |
[
"LibreDWG",
"libredwg"
] |
Then we can deprecate dwg2SVG and dwg2ps, and rather use plotutils, either via libplot or via plot(1), which supports much more output formats, bitmap and vector. Even real plotting formats, like pcl5 and hpgl/2. But also png, svg, ps, ...
The current idea is to be independent on libplot, and generate ASCII plot(5) format manually,
or if available via the libplot C interface.
|
dwgplot via GNU Plotutils
|
https://api.github.com/repos/LibreDWG/libredwg/issues/229/comments
| 3 |
2020-04-15T17:09:24Z
|
2021-05-16T06:23:02Z
|
https://github.com/LibreDWG/libredwg/issues/229
| 600,456,153 | 229 |
[
"LibreDWG",
"libredwg"
] |
make it a real map as "texts": handle, pairs.
this way the numitems cannot get out of sync, and the association is clearly
visible. It's a dictionary afterall.
They just need to stay unsorted when processed by external json processors,
like jq.
|
refactor json DICTIONARY
|
https://api.github.com/repos/LibreDWG/libredwg/issues/228/comments
| 0 |
2020-04-14T14:09:55Z
|
2020-04-17T07:29:52Z
|
https://github.com/LibreDWG/libredwg/issues/228
| 599,602,893 | 228 |
[
"LibreDWG",
"libredwg"
] |
NOD DICTIONARY.itemhandles to ACAD_TABLESTYLE, ACAD_MLEADERSTYLE, ACAD_VIEWDETAILSTYLE, ACAD_VIEWSECTIONSTYLE
Typically in DICTIONARY C, the "NOD" (Named Object Dict).
The AcDbVariableDictionary at 5E only links to the current names of all tabes.
|
encode: skip invalid DICTIONARY handles
|
https://api.github.com/repos/LibreDWG/libredwg/issues/226/comments
| 1 |
2020-04-11T15:55:31Z
|
2020-04-15T15:29:13Z
|
https://github.com/LibreDWG/libredwg/issues/226
| 598,295,510 | 226 |
[
"LibreDWG",
"libredwg"
] |
LTYPE problems:
work_2000.dwg (via dxf2dwg):
```
Reading handle 14 object type AcDbLinetypeTableRecord
Error 34 (eWrongObjectType) Object discarded
Reading handle 15 object type AcDbLinetypeTableRecord
Error 34 (eWrongObjectType) Object discarded
Reading handle 16 object type AcDbLinetypeTableRecord
Error 34 (eWrongObjectType) Object discarded
Reading handle 1A9 object type AcDbLinetypeTableRecord
Error 34 (eWrongObjectType) Object discarded
```
Could be the strings_area. Teigha accepts it.
All other supported entities are now properly imported into ACAD.
The remaining other errors are for Material, VisualStyle, TableStyle, ...
which are harmless.
example_2000.dwg:
```
Valid objects 684 Invalid objects 4
Validating objects completed.
Reading handle A object type AcDbDimStyleTable
Error 34 (eWrongObjectType) Object discarded
Missing AcDbDimStyleTable
Missing AcDbVXTable
Reading handle 1F object type AcDbBlockTableRecord
Error 34 (eWrongObjectType) Object discarded
Creating default *Paper_Space
Salvaged database from drawing.
Reading handle 84 object type AcDbViewport
Error 34 (eWrongObjectType) Object discarded
Reading handle 88 object type AcDbViewport
Error 34 (eWrongObjectType) Object discarded
Reading handle 156 object type AcDbPolyline
Error 67 (eDwgObjectImproperlyRead) Object discarded
Reading handle 176 object type AcDbRegion
Error 150 (eGeneralModelingFailure) Object discarded
Reading handle 190 object type AcDbBlockReference
Error 34 (eWrongObjectType) Object discarded
Reading handle 24F object type AcDbHatch
Error 34 (eWrongObjectType) Object discarded
Reading handle 2AF object type AcDbMLeaderStyle
Error 67 (eDwgObjectImproperlyRead) Object discarded
Reading handle 2E1 object type AcDb3dSolid
Error 150 (eGeneralModelingFailure) Object discarded
Reading handle 37D object type AcDbRegion
Error 67 (eDwgObjectImproperlyRead) Object discarded
Two vertices were added to a 3D pline (41A) which had no vertices.
Reading handle 41A object type AcDb3dPolyline
Error 34 (eWrongObjectType) Object discarded
Reading handle 4E4 object type AcDbPolyFaceMesh
Error 34 (eWrongObjectType) Object discarded
Reading handle 756 object type AcDbBlockReference
Error 34 (eWrongObjectType) Object discarded
Reading handle 75C object type AcDbMline
Error 151 (eOutOfRange) Object discarded
Reading handle 75E object type AcDbLight
Error 67 (eDwgObjectImproperlyRead) Object discarded
Reading handle 9BD object type AcDbTableGeometry
Error 34 (eWrongObjectType) Object discarded
Fixed 4 cross link(s) in entity lists.
Fixed 2 ownership mismatch(es) in entity lists.
Removed 10 unread objects from entity lists.
Auditing Header
Auditing Tables
Auditing Entities Pass 1
AcDbBlockBegin(17E) could not be repaired. It will be Erased.
AcDbBlockBegin(1B9) could not be repaired. It will be Erased.
Pass 1 100 objects audited
Invalid anonymous block "*D33" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-23".
AcDbBlockBegin(381) could not be repaired. It will be Erased.
Invalid anonymous block "*D44" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-24".
AcDbBlockBegin(39B) could not be repaired. It will be Erased.
Invalid anonymous block "*D55" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-25".
AcDbBlockBegin(422) could not be repaired. It will be Erased.
Invalid anonymous block "*D66" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-26".
AcDbBlockBegin(432) could not be repaired. It will be Erased.
Invalid anonymous block "*D77" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-27".
AcDbBlockBegin(43D) could not be repaired. It will be Erased.
Pass 1 200 objects audited
Invalid anonymous block "*D88" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-28".
AcDbBlockBegin(455) could not be repaired. It will be Erased.
Invalid anonymous block "*D99" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-29".
AcDbBlockBegin(469) could not be repaired. It will be Erased.
Invalid anonymous block "*D1010" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-30".
AcDbBlockBegin(481) could not be repaired. It will be Erased.
Invalid anonymous block "*D1111" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-31".
AcDbBlockBegin(499) could not be repaired. It will be Erased.
Invalid anonymous block "*D1212" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-32".
AcDbBlockBegin(4B1) could not be repaired. It will be Erased.
Invalid anonymous block "*T1313" found in Block symbol table.
Changed to normal block "AUDIT_I_200411090751-33".
AcDbBlockBegin(514) could not be repaired. It will be Erased.
Pass 1 300 objects audited
Auditing Entities Pass 2
AcDbDimStyleTableRecord: "ISO-25"
Not in Table Added
AcDbBlockTableRecord: "*Paper_Space14"
Not in Table Added
AcDbBlockTableRecord: "bloko"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "bloko" Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "bloko" Invalid BlockReference id
AcDbBlockTableRecord: "bloko" Invalid BlockReference id
AcDbBlockTableRecord: "CIRKLO_PUNKTOJ"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "CIRKLO_PUNKTOJ"
Block Begin Null or invalid; Replaced
Pass 2 100 objects auditedAcDbDictionary(2AE) Standard ePermanentlyErased Delete Entry
AcDbBlockTableRecord: "AUDIT_I_200411090751-23"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-23"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-24"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-24"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-25"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-25"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-26"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-26"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-27"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-27"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-28"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-28"
Block Begin Null or invalid; Replaced
Pass 2 200 objects auditedAcDbBlockTableRecord: "AUDIT_I_200411090751-29"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-29"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-30"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-30"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-31"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-31"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-32"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-32"
Block Begin Null or invalid; Replaced
AcDbBlockTableRecord: "AUDIT_I_200411090751-33"
BlockBegin Id Invalid Null
AcDbBlockTableRecord: "AUDIT_I_200411090751-33"
Block Begin Null or invalid; Replaced
Pass 2 300 objects audited
Auditing Blocks
14 Blocks audited
Auditing AcDsRecords
Total errors found 45 fixed 45
Erased 30 objects
Opening an AutoCAD 2000 format file.
Regenerating model.
Autodesk DWG. This file is a TrustedDWG last saved by an Autodesk application or Autodesk licensed application.
```
Not so harmless are AcDbPolyline, AcDb3DPolyline and the solids.
|
Fix dxf2dwg ACAD errors: eWrongObjectType (mostly wrong handleref code) and such
|
https://api.github.com/repos/LibreDWG/libredwg/issues/225/comments
| 2 |
2020-04-11T07:27:52Z
|
2020-04-15T15:27:59Z
|
https://github.com/LibreDWG/libredwg/issues/225
| 598,210,396 | 225 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.