From: Alan T. DeKok Date: Sat, 2 Mar 2013 14:53:36 +0000 (-0500) Subject: Hacks for Coverity. X-Git-Tag: release_3_0_0_beta1~880 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dfd63803442f041f7d907db383815fe349213f3;p=thirdparty%2Ffreeradius-server.git Hacks for Coverity. We know that editing the dictionaries won't happen. Coverity doesn't --- diff --git a/src/lib/radius.c b/src/lib/radius.c index b548f92254c..5fd41987ee1 100644 --- 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 */