Debian patch (not clear if submitted upstream): https://salsa.debian.org/debian/atftp/-/commit/6fafea85de488298746900b5c9d34e8dd33c45ab
The author of the debian patch contacted me some time ago and send me his work. I noticed a difference in behaviour between the old an new PCRE implementation, so this porting is IMHO WIP.
closed with https://github.com/gentoo/gentoo/pull/27177 commit 13c3bbe379 I forgot to reference this bug, closing it manually