Skip to content

Commit

Permalink
- Fix #426: nsd crashes with patterns in config_apply_pattern.
Browse files Browse the repository at this point in the history
  • Loading branch information
wcawijngaards committed Jan 22, 2025
1 parent 9061b2d commit c789096
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
22 January 2025: Wouter
- Fix #426: nsd crashes with patterns in config_apply_pattern.

20 January 2025: Willem
- code repository continues with 4.11.2 under development.
- Fix re-enable to configure dns-cookies from config file, which was
Expand Down
1 change: 1 addition & 0 deletions doc/RELNOTES
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NSD RELEASE NOTES
BUG FIXES:
- Fix re-enable to configure dns-cookies from config file, which was
accidentally removed with the 4.11.1 release.
- Fix #426: nsd crashes with patterns in config_apply_pattern.

4.11.1
================
Expand Down
4 changes: 2 additions & 2 deletions options.c
Original file line number Diff line number Diff line change
Expand Up @@ -2773,8 +2773,8 @@ config_apply_pattern(struct pattern_options *dest, const char* name)
c_error("could not find pattern %s", name);
return;
}
if(strncmp(dest->pname, PATTERN_IMPLICIT_MARKER,
strlen(PATTERN_IMPLICIT_MARKER)) == 0
if( (!dest->pname || strncmp(dest->pname, PATTERN_IMPLICIT_MARKER,
strlen(PATTERN_IMPLICIT_MARKER)) == 0)
&& pat->catalog_producer_zone) {
c_error("patterns with an catalog-producer-zone option are to "
"be used with \"nsd-control addzone\" only and cannot "
Expand Down

0 comments on commit c789096

Please sign in to comment.