]> git.ipfire.org Git - thirdparty/freeradius-server.git/commit
Placate coverity CID #1542424, #152423, #152422) (#5168)
authorJames Jones <jejones3141@gmail.com>
Thu, 28 Sep 2023 16:29:07 +0000 (11:29 -0500)
committerGitHub <noreply@github.com>
Thu, 28 Sep 2023 16:29:07 +0000 (10:29 -0600)
commitd6aede18528ee7f3f97f689ffe70955ff8a9de88
tree6bf831d078798051ab3a517cd1289fb48db057e0
parent71da317f23f2ffdb06234155d6b9e57ecad84db9
Placate coverity CID #1542424, #152423, #152422) (#5168)

Currently, three functions mark requests as fake. That involves
calling fr_pair_value_from_str() with the string being "127.0.0.1".
Coverity notices that fr_pair_value_from_str() returns a value
that isn't checked.

 * setup_fake_request() nominally returns an int, but it always
   returns zero, and no caller actuallly checks its return value.
 * The other functions, chbind_process() and eap_fast_eap_payload(),
   return fr_radius_packet_code_t, and it's not clear which
   fr_radius_packet_code_t makes sense in this case.

So... we cast the fr_pair_value_from_str() calls to void.
src/lib/eap/chbind.c
src/modules/rlm_eap/types/rlm_eap_fast/eap_fast.c
src/modules/rlm_eap/types/rlm_eap_peap/peap.c