]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
frame->state is not always populated
authorNick Porter <nick@portercomputing.co.uk>
Thu, 19 Jun 2025 07:21:10 +0000 (08:21 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 19 Jun 2025 08:24:10 +0000 (09:24 +0100)
src/lib/unlang/interpret.c

index 3a3c970cdece0e91dfb0c9de375966342c6a498e..409bfbb8ed0632c557dae94e0bc74c496ef5a72d 100644 (file)
@@ -82,7 +82,7 @@ static int find_result_p_location(result_p_location_t *location, void **chunk, r
 
        for (i = 0; i <= (unsigned int)stack->depth; i++) {
                frame = &stack->frame[i];
-               if ((ptr >= (void *)frame->state) &&
+               if (frame->state && (ptr >= (void *)frame->state) &&
                    (ptr < ((void *)((uint8_t *)frame->state + talloc_get_size(frame->state))))) {
                        *location = RESULT_P_LOCATION_STATE;
                        *chunk = frame->state;