The patch described on the vulnerability page worked 1-to-1 for in two nginx versions I fixed. But in nginx 1.20 in ./src/core/ngx_resolver.c the second replacement does not match the existing if (len == -1){contents} and I had to remove some extra bits based on what seemed right it manually.