diff --git a/examples/sample2.rs b/examples/sample2.rs index b754d81..5336d51 100644 --- a/examples/sample2.rs +++ b/examples/sample2.rs @@ -166,7 +166,7 @@ impl BytePacketBuffer { fn write_qname(&mut self, qname: &str) -> Result<()> { for label in qname.split('.') { let len = label.len(); - if len > 0x34 { + if len > 0x3f { return Err("Single label exceeds 63 characters of length".into()); } diff --git a/examples/sample3.rs b/examples/sample3.rs index 32a3001..203cb2d 100644 --- a/examples/sample3.rs +++ b/examples/sample3.rs @@ -166,7 +166,7 @@ impl BytePacketBuffer { fn write_qname(&mut self, qname: &str) -> Result<()> { for label in qname.split('.') { let len = label.len(); - if len > 0x34 { + if len > 0x3f { return Err("Single label exceeds 63 characters of length".into()); } diff --git a/examples/sample4.rs b/examples/sample4.rs index a648131..a1633ad 100644 --- a/examples/sample4.rs +++ b/examples/sample4.rs @@ -166,7 +166,7 @@ impl BytePacketBuffer { fn write_qname(&mut self, qname: &str) -> Result<()> { for label in qname.split('.') { let len = label.len(); - if len > 0x34 { + if len > 0x3f { return Err("Single label exceeds 63 characters of length".into()); } diff --git a/examples/sample5.rs b/examples/sample5.rs index 40555c9..c2b47df 100644 --- a/examples/sample5.rs +++ b/examples/sample5.rs @@ -166,7 +166,7 @@ impl BytePacketBuffer { fn write_qname(&mut self, qname: &str) -> Result<()> { for label in qname.split('.') { let len = label.len(); - if len > 0x34 { + if len > 0x3f { return Err("Single label exceeds 63 characters of length".into()); }