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

Michael Stahl mstahl at redhat.com
Thu May 24 03:55:38 PDT 2012


On 23/05/12 23:08, julien2412 wrote:
> 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 

hmmm yes that looks reasonable, should fix it.

> 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.?)

just git add both files, the new one and the existing one, and then git
commit.



More information about the LibreOffice mailing list