projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79196ac
)
Dereferencing NULL is bad
author
Alan T. DeKok
<aland@freeradius.org>
Mon, 17 Nov 2014 20:35:18 +0000
(15:35 -0500)
committer
Alan T. DeKok
<aland@freeradius.org>
Mon, 17 Nov 2014 20:35:18 +0000
(15:35 -0500)
src/lib/pair.c
patch
|
blob
|
history
diff --git
a/src/lib/pair.c
b/src/lib/pair.c
index
998dc22
..
9c3fdea
100644
(file)
--- a/
src/lib/pair.c
+++ b/
src/lib/pair.c
@@
-1857,6
+1857,8
@@
int paircmp(VALUE_PAIR *a, VALUE_PAIR *b)
#ifndef WITH_REGEX
return -1;
#else
+ if (!b) return false;
+
{
int compare;
regex_t reg;
@@
-1893,6
+1895,7
@@
int paircmp(VALUE_PAIR *a, VALUE_PAIR *b)
#endif
default: /* we're OK */
+ if (!b) return false;
break;
}