Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: frithjofh on December 02, 2015, 12:22:01 pm

Title: bug in configmanager.cpp and patch file
Post by: frithjofh on December 02, 2015, 12:22:01 pm
hi everybody,

found a bug in configmanager.cpp which can lead to undefined behaviour. probably harmless...

but patch attached.

function used map.erase(iterator) and then tries to increment that iterator in the next loop and use it again. this is undefined according to both wx documentation and stl documentation.

replaced call to map.erase(iter) inside the loop with call to clear map.clear() after the loop

regards
Title: Re: bug in configmanager.cpp and patch file
Post by: frithjofh on December 02, 2015, 01:09:48 pm
patch has an error

attached the correct one
Title: Re: bug in configmanager.cpp and patch file
Post by: oBFusCATed on December 03, 2015, 05:06:27 am
This will probably cause a crash someday. Will apply it next week, when I get access to my computer back.
Title: Re: bug in configmanager.cpp and patch file
Post by: ollydbg on December 05, 2015, 04:16:55 pm
The patch is in trunk now, thanks.