]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
use temporary "end"
authorAlan T. DeKok <aland@freeradius.org>
Thu, 6 Jan 2022 14:52:57 +0000 (09:52 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 6 Jan 2022 14:52:57 +0000 (09:52 -0500)
and pass the right parent in decode_wimax

src/protocols/radius/decode.c

index 654bf1263876f5a2f2933889942d1587fe8a058c..76cf9fda9ee6672683d0fc9475d00b492ab4d2c1 100644 (file)
@@ -795,13 +795,13 @@ static ssize_t decode_extended(TALLOC_CTX *ctx, fr_pair_list_t *out,
         *      the real data.
         */
        {
-               end = packet_ctx->end;
+               uint8_t const *tmp = packet_ctx->end;
                packet_ctx->end = head + fraglen;
 
                ret = fr_radius_decode_pair_value(ctx, out,
                                                  parent, head, fraglen, packet_ctx);
 
-               packet_ctx->end = end;
+               packet_ctx->end = tmp;
        }
 
        talloc_free(head);
@@ -977,13 +977,15 @@ static ssize_t decode_wimax(TALLOC_CTX *ctx, fr_pair_list_t *out,
         *      the real data.
         */
        {
-               end = packet_ctx->end;
+               uint8_t const *tmp = packet_ctx->end;
                packet_ctx->end = head + wimax_len;
 
+               FR_PROTO_TRACE("WiMAX decode concatenated");
+               FR_PROTO_HEX_DUMP(head, wimax_len, "%s", __FUNCTION__ );
                ret = fr_radius_decode_pair_value(ctx, out,
-                                                 parent, head, wimax_len, packet_ctx);
+                                                 da, head, wimax_len, packet_ctx);
 
-               packet_ctx->end = end;
+               packet_ctx->end = tmp;
        }
 
        talloc_free(head);