Skip to content

Commit

Permalink
Hacks for Coverity.
Browse files Browse the repository at this point in the history
We know that editing the dictionaries won't happen.  Coverity doesn't
  • Loading branch information
alandekok committed Mar 2, 2013
1 parent aa3bb1e commit 6dfd638
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/lib/radius.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6dfd638

Please sign in to comment.