Skip to content

Commit

Permalink
be stricter about parsing netmask prefix lengths, fixes PowerDNS#331
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@2629 d19b8d6e-7fed-0310-83ef-9ca221ded41b
  • Loading branch information
peter committed Jun 15, 2012
1 parent 0169893 commit 4d22088
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pdns/iputils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public:
d_network=makeComboAddress(split.first);

if(!split.second.empty()) {
d_bits = (uint8_t) atoi(split.second.c_str());
d_bits = lexical_cast<unsigned int>(split.second);
if(d_bits<32)
d_mask=~(0xFFFFFFFF>>d_bits);
else
Expand Down

0 comments on commit 4d22088

Please sign in to comment.