Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

cppcheck plugin; SIGSEGV fixed

(1/1)

blauzahn:
The plugin crashed cb when cppcheck has been executed but returns with a failure. This happens e.g. when cppcheck complains about missing std.cfg.  I have observed this when using trunk for months on Linux amd64 (e.g. antergos). So, nothing that has changed recently.

The reason for this is a dereferencing nullptr in CppCheck.cpp:332


--- Code: ---if (nullptr!=resultNode->Attribute("version"))

--- End code ---

->* has higher operator precedence than !=

The attached patch changes this to:


--- Code: ---if (nullptr!=resultNode && resultNode->Attribute("version"))

--- End code ---

crashlog including gdb backtrace is attached as well.

If appropriate, can somebody please patch trunk?

Thank you in advance.

oBFusCATed:
Thanks, I'll push it soon...

blauzahn:
Thank you.

Navigation

[0] Message Index

Go to full version