[REVIEW][3-5] fdo#46923 possibly dodgy use of invalid iterators in sc inputhdl.cxx

Caolán McNamara caolanm at redhat.com
Thu Mar 8 08:14:26 PST 2012


So, for https://bugs.freedesktop.org/show_bug.cgi?id=46923 under Linux
with debugging stl iterators I can see "use of invalid iterator" stl
errors with miAutoPosColumn which is a plausible reason for the reported
crash.

miAutoPosFormula is used to point into the std::set pFormulaData and
miAutoPosColumn is used to point into the std::set pColumnData

I reckon the safest thing to do is to initialize those to the end of
their respective containers when the containers are initially allocated,
i.e.

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a3f1614c606629196ca71dc22dab3343b060dced

C.



More information about the LibreOffice mailing list