[PATCH] fix proposed for fdo#50178 (Visio)

julien2412 serval2412 at yahoo.fr
Wed May 23 14:08:53 PDT 2012


Hello,

I took a look at the fdo#50178 Reading Visio file causes crash and put a
backtrace here https://bugs.freedesktop.org/attachment.cgi?id=61938

Interesting console message :
/usr/include/c++/4.6/debug/safe_iterator.h:465:error: attempt to compare 
    iterators from different sequences.

and location for bt :
 
.../libvisio/unxlngx6/misc/build/libvisio-0.0.16/src/lib/VSDXContentCollector.cpp:1499

Then here is the line which fails :
1499   if (iter != m_NURBSData.end())

The problem is "iter" can be initialized in both ways :
- 1492     iter = m_stencilShape->m_nurbsData.find(dataID);
- or 1496  iter = m_NURBSData.find(dataID);

So I propose a patch which defines a variable "iterEnd" initialized in both
specific cases and with which "iter" is compared.
http://nabble.documentfoundation.org/file/n3985678/libvisio-0.0.16-fdo50178.patch
libvisio-0.0.16-fdo50178.patch 
+ straightforward makefile patch to include the patch above
http://nabble.documentfoundation.org/file/n3985678/makefile.mk.patch
makefile.mk.patch 

I compiled on 3.5 branch updated (had some problems with master, will check
later why) and hopefully the file opened.

Any idea about this ?

Julien.

PS : If the fix is right, I'm not sure how to commit push it ("git add 
libvisio-0.0.16-fdo50178.patch" then "git commit -a" etc.?)

--
View this message in context: http://nabble.documentfoundation.org/PATCH-fix-proposed-for-fdo-50178-Visio-tp3985678.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list