orbitcowboy
ee1ba85e15
symboldatabase: Fix potential null pointer dereference ( #1072 )
...
There is a potential `nullPointer` dereference in symboldatabase. This PR attempts to fix this. Additionally, this could be detected by Cppcheck as well.
Here is a reduced and compilable testcase, where Cppcheck fails to detect a potential `nullPointer` dereference:
```
class Scope
{
public:
bool bar();
int *definedType;
};
int f(Scope *new_scope)
{
int ret = 1;
if (new_scope)
{
if (new_scope->bar())
{
if (!new_scope->definedType) {} // check for null
ret = *new_scope->definedType; // dereference
}
}
return ret;
}
```
The corresponding ticket on track, addressing the false negative: https://trac.cppcheck.net/ticket/8375
2018-01-31 11:00:42 +01:00
..
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-27 14:48:45 +01:00
2018-01-27 14:48:45 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-27 22:09:43 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-30 08:43:15 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-21 22:56:46 +01:00
2018-01-21 22:56:46 +01:00
2018-01-26 22:49:07 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-21 07:26:37 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-19 22:41:51 +01:00
2018-01-15 22:25:55 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-29 15:15:35 +01:00
2018-01-25 21:49:21 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2016-08-06 18:21:54 +02:00
2016-01-09 09:33:56 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2017-01-22 10:21:29 +01:00
2017-11-29 08:31:30 +01:00
2017-03-16 21:15:10 +01:00
2016-01-01 15:34:45 +02:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2016-10-29 12:18:11 +02:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2016-01-01 15:34:45 +02:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-31 11:00:42 +01:00
2018-01-14 15:37:52 +01:00
2018-01-20 22:26:48 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-28 14:27:01 +01:00
2018-01-14 15:37:52 +01:00
2018-01-27 22:26:43 +01:00
2018-01-14 15:46:20 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 15:37:52 +01:00
2018-01-14 16:25:17 +01:00