From: Alan T. DeKok Date: Wed, 13 Apr 2022 20:21:29 +0000 (-0400) Subject: remove dead code. CID #1504073 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1c9cca652544ecfc9d286d47b54923de8f8ffd14;p=thirdparty%2Ffreeradius-server.git remove dead code. CID #1504073 --- diff --git a/src/protocols/radius/encode.c b/src/protocols/radius/encode.c index 5886fbf3cd2..f0b29072f74 100644 --- a/src/protocols/radius/encode.c +++ b/src/protocols/radius/encode.c @@ -160,11 +160,7 @@ static ssize_t encode_tunnel_password(fr_dbuff_t *dbuff, fr_dbuff_marker_t *in, * password. */ encrypted_len = ROUND_UP(inlen + 1, 16); - if (encrypted_len > (RADIUS_MAX_STRING_LENGTH - 2)) { - encrypted_len = (RADIUS_MAX_STRING_LENGTH - 2); - - if (encrypted_len < (inlen + 1)) goto fail; - } + if (encrypted_len > (RADIUS_MAX_STRING_LENGTH - 2)) encrypted_len = (RADIUS_MAX_STRING_LENGTH - 2); /* * Get the number of padding bytes in the last block.