From: Bob Halley Date: Sat, 23 May 2020 20:58:34 +0000 (-0700) Subject: leading zero detection in dns.ipv4.inet_aton() was broken X-Git-Tag: v2.0.0rc1~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b641b5fbf5122ceb81f1f529b74793c3c9515f1;p=thirdparty%2Fdnspython.git leading zero detection in dns.ipv4.inet_aton() was broken --- 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: