]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
remove dead code. CID #1504073
authorAlan T. DeKok <aland@freeradius.org>
Wed, 13 Apr 2022 20:21:29 +0000 (16:21 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 13 Apr 2022 20:52:54 +0000 (16:52 -0400)
src/protocols/radius/encode.c

index 5886fbf3cd2da6041f078eb7968647f2503dcc70..f0b29072f742793e5d2b8d847f0eb7394529e89d 100644 (file)
@@ -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.