[Bug 523345] New: aspell-0.60.6-26.31: bad call to C++ STL erase
http://bugzilla.novell.com/show_bug.cgi?id=523345 Summary: aspell-0.60.6-26.31: bad call to C++ STL erase Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: All OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de Found By: --- I just had a look at factory package aspell-0.60.6-26.31 For source code file aspell-0.60.6/lib/new_fmode.cpp, around line 283 is the source code for ( Vector<String>::iterator it = fileExtensions.begin() ; it != fileExtensions.end() ; it++ ) { if ( *it == ext ) { fileExtensions.erase(it); } } This is a dangerous use of erase. In the C++ STL, all iterators are invalidated when erase is called. Suggest new code for ( Vector<String>::iterator it = fileExtensions.begin() ; it != fileExtensions.end() ; ) { if ( *it == ext ) { it = fileExtensions.erase(it); } else ++it; } -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=523345
Marcus Meissner
http://bugzilla.novell.com/show_bug.cgi?id=523345
Petr Gajdos
http://bugzilla.novell.com/show_bug.cgi?id=523345
User pgajdos@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=523345#c1
Petr Gajdos
participants (1)
-
bugzilla_noreply@novell.com