Skip to content

Commit 36f2cce

Browse files
committed
updated ngx-build to avoid applying patches to older nginx cores.
1 parent 38dc363 commit 36f2cce

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

ngx-build

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -402,9 +402,17 @@ sub apply_patches {
402402
chdir ".." or die "cannot switch to ..\n";
403403
}
404404

405-
chdir "nginx-$version" or die "cannot switch to nginx-$version\n";
406-
shell("patch -p1 < $root/../ngx_openresty/patches/nginx-$version-resolver_del_event_invalid_read.patch");
407-
chdir ".." or die "cannot switch to ..\n";
405+
unless ($ver le '001007004') {
406+
chdir "nginx-$version" or die "cannot switch to nginx-$version\n";
407+
shell("patch -p1 < $root/../ngx_openresty/patches/nginx-$version-resolver_del_event_invalid_read.patch");
408+
chdir ".." or die "cannot switch to ..\n";
409+
}
410+
411+
unless ($ver le '001007004') {
412+
chdir "nginx-$version" or die "cannot switch to nginx-$version\n";
413+
shell("patch -p1 < $root/../ngx_openresty/patches/nginx-$version-hash_overflow.patch");
414+
chdir ".." or die "cannot switch to ..\n";
415+
}
408416
}
409417

410418
sub usage {

0 commit comments

Comments
 (0)