]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
Annotate dead code false positive (CID #1504072) (#4646)
authorJames Jones <jejones3141@gmail.com>
Wed, 3 Aug 2022 13:46:14 +0000 (08:46 -0500)
committerGitHub <noreply@github.com>
Wed, 3 Aug 2022 13:46:14 +0000 (09:46 -0400)
commit56718521fce67d488dc00a5e9cf9a768f7a9d5b1
treecbb4f67e9ae4348be9b87cf61f50bc429e06be27
parent6ec68611b54b38d3079d66ee00d8b8bdb6acc85d
Annotate dead code false positive (CID #1504072) (#4646)

Coverity doesn't see that a successful call to fr_base16_decode()
in fr_ldap_util_normalise_dn(), c will be set. Unfortunately, it
appears that each of the ten cases of the switch statement
checking for an escape sequence (other than \\) would then require
annotation.

We therefore use an array of bool const so the check for a valid
escape sequence happens in one line, needing only one annotation.
(Having done this, one might as well use it in fr_ldap_util_is_dn(),
and that is indeed done.)
src/lib/ldap/util.c