]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
lib/unlang/xlat_alloc: check tmpl_copy() failure in _xlat_copy_internal (NULL deref)
authorAlexander Bainbridge-Sedivy <alex.bainbridge@inkbridge.io>
Wed, 22 Jul 2026 19:41:06 +0000 (15:41 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 30 Jul 2026 15:20:02 +0000 (11:20 -0400)
src/lib/unlang/xlat_alloc.c

index a1a34d3c31fa0da7adf92edb518429924ac66cda..1dee6a512a56dc43d778aaca15786a415cec0743 100644 (file)
@@ -409,7 +409,7 @@ static int CC_HINT(nonnull) _xlat_copy_internal(NDEBUG_LOCATION_ARGS TALLOC_CTX
                        break;
 
                case XLAT_TMPL:
-                       node->vpt = tmpl_copy(node, p->vpt);
+                       if (unlikely(!(node->vpt = tmpl_copy(node, p->vpt)))) goto error;
                        break;
 
 #ifdef HAVE_REGEX