BIND 10 master, updated. 927511744e90baff4b1d7b4c92797f0c9b1dbea6 [master] Add ChangeLog for #3114
BIND 10 source code commits
bind10-changes at lists.isc.org
Fri Nov 22 08:26:16 UTC 2013
The branch, master has been updated
via 927511744e90baff4b1d7b4c92797f0c9b1dbea6 (commit)
via 9bd776e36b7f53a6ee2e4d5a2ea79722ba5fe13b (commit)
via 9ad9193ea3565d71a2c7a5fb7eff225be8c8e2ab (commit)
via e12b9bda527f26fff635e14b28cf60dda8f1cabb (commit)
from ae4a470fa56723eeb41df8145823144031a5039b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 927511744e90baff4b1d7b4c92797f0c9b1dbea6
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Nov 22 13:44:34 2013 +0530
[master] Add ChangeLog for #3114
commit 9bd776e36b7f53a6ee2e4d5a2ea79722ba5fe13b
Merge: ae4a470 9ad9193
Author: Mukund Sivaraman <muks at isc.org>
Date: Fri Nov 22 13:41:35 2013 +0530
Merge branch 'trac3114'
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
src/lib/python/isc/config/config_data.py | 15 +++++++++++----
.../python/isc/config/tests/config_data_test.py | 2 ++
3 files changed, 19 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
diff --git a/ChangeLog b/ChangeLog
index 0227d36..dc2c07a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+707. [bug] muks
+ Using very large numbers (out of bounds) in config values caused
+ BIND 10 to throw an exception. This has been fixed in a patch
+ contributed by David Carlier.
+ (Trac #3114, git 9bd776e36b7f53a6ee2e4d5a2ea79722ba5fe13b)
+
706. [func] marcin
b10-dhcp4: Server processes the DHCPv4 Client FQDN and Host Name
options sent by a client and generates the response. as a result
diff --git a/src/lib/python/isc/config/config_data.py b/src/lib/python/isc/config/config_data.py
index 495d20b..e2b1357 100644
--- a/src/lib/python/isc/config/config_data.py
+++ b/src/lib/python/isc/config/config_data.py
@@ -24,6 +24,7 @@ import isc.cc.data
import isc.config.module_spec
import ast
import copy
+import sys
class ConfigDataError(Exception): pass
@@ -62,10 +63,16 @@ def check_type(spec_part, value):
else:
raise isc.cc.data.DataTypeError(str("Incorrect specification part for type checking"))
- if data_type == "integer" and type(value) != int:
- raise isc.cc.data.DataTypeError(str(value) + " is not an integer")
- elif data_type == "real" and type(value) != float:
- raise isc.cc.data.DataTypeError(str(value) + " is not a real")
+ if data_type == "integer":
+ if type(value) != int:
+ raise isc.cc.data.DataTypeError(str(value) + " is not an integer")
+ if value > sys.maxsize:
+ raise isc.cc.data.DataTypeError(str(value) + " is too large an integer")
+ elif data_type == "real":
+ if type(value) != float:
+ raise isc.cc.data.DataTypeError(str(value) + " is not a real")
+ if float(value) > sys.float_info.max:
+ raise isc.cc.data.DataTypeError(str(value) + " is too large a float")
elif data_type == "boolean" and type(value) != bool:
raise isc.cc.data.DataTypeError(str(value) + " is not a boolean")
elif data_type == "string" and type(value) != str:
diff --git a/src/lib/python/isc/config/tests/config_data_test.py b/src/lib/python/isc/config/tests/config_data_test.py
index ddeabb6..83f22c9 100644
--- a/src/lib/python/isc/config/tests/config_data_test.py
+++ b/src/lib/python/isc/config/tests/config_data_test.py
@@ -47,6 +47,7 @@ class TestConfigData(unittest.TestCase):
self.assertRaises(isc.cc.data.DataTypeError, check_type, spec_part, "a")
self.assertRaises(isc.cc.data.DataTypeError, check_type, spec_part, [ 1, 2 ])
self.assertRaises(isc.cc.data.DataTypeError, check_type, spec_part, { "a": 1 })
+ self.assertRaises(isc.cc.data.DataTypeError, check_type, spec_part, 10000000000000000000000)
spec_part = find_spec_part(config_spec, "value2")
check_type(spec_part, 1.1)
@@ -55,6 +56,7 @@ class TestConfigData(unittest.TestCase):
self.assertRaises(isc.cc.data.DataTypeError, check_type, spec_part, "a")
self.assertRaises(isc.cc.data.DataTypeError, check_type, spec_part, [ 1, 2 ])
self.assertRaises(isc.cc.data.DataTypeError, check_type, spec_part, { "a": 1 })
+ self.assertRaises(isc.cc.data.DataTypeError, check_type, spec_part, 2.0000000e+308)
spec_part = find_spec_part(config_spec, "value3")
check_type(spec_part, True)
More information about the bind10-changes
mailing list