]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
let's add one more check
authorAlan T. DeKok <aland@freeradius.org>
Tue, 12 Oct 2021 12:51:54 +0000 (08:51 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 12 Oct 2021 12:52:03 +0000 (08:52 -0400)
src/protocols/tacacs/decode.c

index c067a8c0d58400da167b6d81e86cc18e07f30a8d..a986ebb307149b4ae64508e7cf6297534d7358c2 100644 (file)
@@ -118,6 +118,7 @@ static int tacacs_decode_args(TALLOC_CTX *ctx, fr_pair_list_t *out, fr_dict_attr
                buffer[arg_list[i]] = '\0';
 
                arg_end = buffer + arg_list[i];
+               if (arg_end > end) return -1;
 
                for (value = buffer, name_end = NULL; value < arg_end; value++) {
                        /*