]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
check lengths, too
authorAlan T. DeKok <aland@freeradius.org>
Wed, 20 Apr 2022 12:49:21 +0000 (08:49 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 20 Apr 2022 13:19:04 +0000 (09:19 -0400)
src/protocols/radius/decode.c

index 50797a3f0f23edda6e256633026dc3d8fd91af54..803270fd5c9da77809cedd99d1338da9f0e7252d 100644 (file)
@@ -633,7 +633,7 @@ redo:
         *      Decode consecutive ones into the same parent.
         */
        p += p[1];
-       if (((p + 2) < end) && (p[0] == FR_DIGEST_ATTRIBUTES)) {
+       if (((p + 2) < end) && ((p[0] == FR_DIGEST_ATTRIBUTES) && (p[1] > 2))) {
                goto redo;
        }