From: Nick Porter Date: Thu, 19 Jun 2025 07:21:10 +0000 (+0100) Subject: frame->state is not always populated X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=32e288fe4ee41bbdba0eed792b273b0bdd425413;p=thirdparty%2Ffreeradius-server.git frame->state is not always populated --- diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 3a3c970cdec..409bfbb8ed0 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -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;