[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible null pointer dereference?
From: |
Ben Pfaff |
Subject: |
Re: Possible null pointer dereference? |
Date: |
Sat, 13 Apr 2019 08:38:18 -0700 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Sat, Apr 13, 2019 at 04:21:09PM +0200, John Darrington wrote:
> Cppcheck warns that:
>
> [src/language/control/control-stack.c:80]
> -> [src/language/control/control-stack.c:72]:
> (warning) Either the condition 'top!=0' is redundant or there is possible
> null pointer dereference: top.
I don't think the checker is right in this case. top != NULL can be
true even if top->class != class, and then if ctl_stack_search() returns
nonnull we know that top != NULL.