projects
/
pdns
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24a64cb
)
Basic validation of $GENERATE parameters
author
Otto Moerbeek
<otto.moerbeek@open-xchange.com>
Wed, 23 Oct 2019 08:50:33 +0000
(10:50 +0200)
committer
Otto Moerbeek
<otto.moerbeek@open-xchange.com>
Wed, 23 Oct 2019 09:53:20 +0000
(11:53 +0200)
(cherry picked from commit
775a673a1798d01e5e259a00cff7a757f5350f40
)
pdns/zoneparser-tng.cc
patch
|
blob
|
history
diff --git
a/pdns/zoneparser-tng.cc
b/pdns/zoneparser-tng.cc
index 49841c4b7308a913c61b9440353996b4be5d38d6..c98fdd246307cc56ef2d5bf9238f591d13036516 100644
(file)
--- a/
pdns/zoneparser-tng.cc
+++ b/
pdns/zoneparser-tng.cc
@@
-313,6
+313,10
@@
bool ZoneParserTNG::get(DNSResourceRecord& rr, std::string* comment)
d_templatestep=1;
d_templatestop=0;
sscanf(range.c_str(),"%u-%u/%u", &d_templatecounter, &d_templatestop, &d_templatestep);
+ if (d_templatestep < 1 ||
+ d_templatestop < d_templatecounter) {
+ throw exception("Illegal $GENERATE parameters");
+ }
d_templateline=d_line;
parts.pop_front();
parts.pop_front();