projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa3bb1e
)
Hacks for Coverity.
author
Alan T. DeKok
<aland@freeradius.org>
Sat, 2 Mar 2013 14:53:36 +0000
(09:53 -0500)
committer
Alan T. DeKok
<aland@freeradius.org>
Sat, 2 Mar 2013 15:12:41 +0000
(10:12 -0500)
We know that editing the dictionaries won't happen. Coverity doesn't
src/lib/radius.c
patch
|
blob
|
history
diff --git
a/src/lib/radius.c
b/src/lib/radius.c
index
b548f92
..
5fd4198
100644
(file)
--- a/
src/lib/radius.c
+++ b/
src/lib/radius.c
@@
-3195,6
+3195,15
@@
static ssize_t data2vp(const RADIUS_PACKET *packet,
return 0;
}
+#ifndef NDEBUG
+ /*
+ * Hacks for Coverity. Editing the dictionary
+ * will break assumptions about CUI. We know
+ * this, but Coverity doesn't.
+ */
+ if (da->type != PW_TYPE_STRING) return -1;
+#endif
+
data = (const uint8_t *) "";
datalen = 1;
goto alloc_cui; /* skip everything */