bugLibreDWG - Bugs: bug #31867, opening a file with an unsupported...


bug #31867: opening a file with an unsupported dwg revision could cause a segfault

Submitted by:  Giampaolo Bellini <iw2lsi>
Submitted on:  Mon Dec 13 21:51:23 2010  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu Jan 27 16:32:39 2011, comment #1:

I can verify this bug.

My test file (at https://pi-xi.net/share/libredwg/AutoCAD_Architecture_2011_Student_Version_R2010_Test_1.dwg) contains one polyline and two annotative dimensions (seen here: https://pi-xi.net/share/libredwg/AutoCAD_Architecture_2011_Student_Version_R2010_Test_1.png)


./testSVG AutoCAD_Architecture_2011_Student_Version_R2010_Test_1.dwg > test1.svg

causes a segfault. There is no stderr output whatsoever (exported LIBREDWG_TRACE=3). Trying it on the example.dwg works fine

I also noticed that just running ./testSVG foobar (when foobar is a nonexisting or existing file) causes a segfault except when using with the libredwg example DWGs.

I tried out an empty R2007 file (at https://pi-xi.net/share/libredwg/AutoCAD_Architecture_2011_Student_Version_R2007-LT2007.dwg), it produced also a segfault but also stderr output which I have attached here (R2007.out). I did the same with R2004 and R14 exported DWG files (empty as well). R2004 produced a segfault as well but no stderr output, R14 exported correctly.

I am running it on Fedora 14 x86_64 compiled from a snapshot (27.01.2011). I have created all the DWGs with Autodesk AutoCAD Architecture 2011 Student version available from http://students.autodesk.com/. It is an exact replica of the full retail version except for the licensing which has to be renewed every year.

(file #22534, file #22535)

Otso Helenius <piksi>
Mon Dec 13 21:51:23 2010, original submission:

opening a file with a bad dwg contents or with an unsupported dwg revision could cause a segfault.

be able to retrieve the dwg revision before load/parse the entire file could be a first stage in order to reduce the probability of a segfault of an application (when caused by unsupported dwg revision)

Giampaolo Bellini <iw2lsi>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

Attached Files
file #22535:  R2007.out added by piksi (9kB - application/octet-stream)
file #22534:  R14-LT98-LT97.out added by piksi (2kB - application/octet-stream)
file #22198:  sign01.dwg added by iw2lsi (21kB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by piksi (Updated the item)
  • -unavailable- added by iw2lsi (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Jan 27 16:32:39 2011piksiAttached File-=>Added R2007.out, #22535
    Thu Jan 27 16:32:38 2011piksiAttached File-=>Added R14-LT98-LT97.out, #22534
    Tue Dec 14 07:46:55 2010iw2lsiAttached File-=>Added sign01.dwg, #22198

    Back to the top

    Powered by Savane 3.1-cleanup1