diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2009-09-29 06:50:35 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2009-09-29 06:50:35 +0000 |
commit | e362a37cbcd2333c0bfeec54d66303e231aba1c7 (patch) | |
tree | 1e469e722e8a634fd617d265cbb3eaf89b25d78e /epan/emem.c | |
parent | ff7492d22d9edb6a1f9ca081ed420ddf472bc300 (diff) |
Ensure we don't dereference a null pointer.
Made emem_canary() static.
svn path=/trunk/; revision=30186
Diffstat (limited to 'epan/emem.c')
-rw-r--r-- | epan/emem.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/epan/emem.c b/epan/emem.c index 991704fce4..c40ddf2c1f 100644 --- a/epan/emem.c +++ b/epan/emem.c @@ -147,7 +147,7 @@ static intptr_t pagesize; /* * Set a canary value to be placed between memchunks. */ -void +static void emem_canary(guint8 *canary) { int i; static GRand *rand_state = NULL; @@ -903,6 +903,10 @@ emem_tree_lookup32_le(emem_tree_t *se_tree, guint32 key) } + if(!node){ + return NULL; + } + /* If we are still at the root of the tree this means that this node * is either smaller than the search key and then we return this * node or else there is no smaller key available and then |