Skip to content

Commit c789096

Browse files
committed
- Fix #426: nsd crashes with patterns in config_apply_pattern.
1 parent 9061b2d commit c789096

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

doc/ChangeLog

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
22 January 2025: Wouter
2+
- Fix #426: nsd crashes with patterns in config_apply_pattern.
3+
14
20 January 2025: Willem
25
- code repository continues with 4.11.2 under development.
36
- Fix re-enable to configure dns-cookies from config file, which was

doc/RELNOTES

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ NSD RELEASE NOTES
55
BUG FIXES:
66
- Fix re-enable to configure dns-cookies from config file, which was
77
accidentally removed with the 4.11.1 release.
8+
- Fix #426: nsd crashes with patterns in config_apply_pattern.
89

910
4.11.1
1011
================

options.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -2773,8 +2773,8 @@ config_apply_pattern(struct pattern_options *dest, const char* name)
27732773
c_error("could not find pattern %s", name);
27742774
return;
27752775
}
2776-
if(strncmp(dest->pname, PATTERN_IMPLICIT_MARKER,
2777-
strlen(PATTERN_IMPLICIT_MARKER)) == 0
2776+
if( (!dest->pname || strncmp(dest->pname, PATTERN_IMPLICIT_MARKER,
2777+
strlen(PATTERN_IMPLICIT_MARKER)) == 0)
27782778
&& pat->catalog_producer_zone) {
27792779
c_error("patterns with an catalog-producer-zone option are to "
27802780
"be used with \"nsd-control addzone\" only and cannot "

0 commit comments

Comments
 (0)