From 9b641b5fbf5122ceb81f1f529b74793c3c9515f1 Mon Sep 17 00:00:00 2001 From: Bob Halley Date: Sat, 23 May 2020 13:58:34 -0700 Subject: [PATCH] leading zero detection in dns.ipv4.inet_aton() was broken --- dns/ipv4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dns/ipv4.py b/dns/ipv4.py index 9d4370b6..e1f38d3d 100644 --- a/dns/ipv4.py +++ b/dns/ipv4.py @@ -50,7 +50,7 @@ def inet_aton(text): for part in parts: if not part.isdigit(): raise dns.exception.SyntaxError - if len(part) > 1 and part[0] == '0': + if len(part) > 1 and part[0] == ord('0'): # No leading zeros raise dns.exception.SyntaxError try: -- 2.47.3