Closed bryonglodencissp closed 8 years ago
in this case it's std::vector<>::iterator so most compilers will represent it as a pointer... for which NULL won't cause memory corruption
That said: it's correctly identified as undefined behavior and I've got a patch to fix it... coming soon
Thanks for correcting my typo 👍 And way to go (WTG) with your patch!
Greetings. I found three issues, where
memset
is used on a struct that contains astd::vector
. This can be dangerous and can lead to inconsistent memory (see discussion at http://stackoverflow.com/questions/6877281/memset-structure-with-stdstring-contained).Found by https://github.com/bryongloden/cppcheck