linux-4.2-rc6/fs/afs/server.c:210:Possible null pointer dereference
David Howells
dhowells at redhat.com
Mon Aug 10 07:45:27 PDT 2015
David Binderman <dcb314 at hotmail.com> wrote:
> server = NULL;
>
> then a few lines later server has -> applied to it.
>
> ASSERTIFCMP(server, server->addr.s_addr, ==, addr.s_addr);
There is no NULL derefernce there.
#define ASSERTIFCMP(C, X, OP, Y) do { if (unlikely((C) && !((X) OP (Y)))) { printk(KERN_ERR "\n"); printk(KERN_ERR "AFS: Assertion failed\n"); printk(KERN_ERR "%lu " #OP " %lu is false\n", (unsigned long)(X), (unsigned long)(Y)); printk(KERN_ERR "0x%lx " #OP " 0x%lx is false\n", (unsigned long)(X), (unsigned long)(Y)); BUG(); } } while(0)
David
More information about the linux-afs
mailing list