diff options
author | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-06-16 09:04:36 +0000 |
---|---|---|
committer | horwitz <horwitz@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-06-16 09:04:36 +0000 |
commit | 9f02c80606cbe722fc419e018caf57319a0ded07 (patch) | |
tree | 4546a41dc3b583c79e0fff7194c9236d29c9d1fe /navit | |
parent | 51f27825f4c35d64e1b4aafbb5870d493120fa71 (diff) | |
download | navit-9f02c80606cbe722fc419e018caf57319a0ded07.tar.gz |
Fix:Core:Fix coverity bug #3, Variable p tracked as NULL was dereferenced.
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2320 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit')
-rw-r--r-- | navit/callback.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/navit/callback.c b/navit/callback.c index a3f07cd33..fa2087b95 100644 --- a/navit/callback.c +++ b/navit/callback.c @@ -147,8 +147,10 @@ callback_call(struct callback *cb, int pcount, void **p) if (cb->pcount && cb->p) dbg(1,"cb->p[0]=%p\n", cb->p[0]); dbg(1,"pcount=%d\n", pcount); - if (pcount && p) + if (pcount) { + dbg_assert(p!=NULL); dbg(1,"p[0]=%p\n", p[0]); + } for (i = 0 ; i < cb->pcount ; i++) pf[i]=cb->p[i]; for (i = 0 ; i < pcount ; i++) |