From cf487bb3c09d4e0532bd452ad3aa5eb292b176ba Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 28 Mar 2015 03:10:42 -0400 Subject: padding byte of 0x00 isn't valid --- tests/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests') diff --git a/tests/lib.rs b/tests/lib.rs index 3dbfa55..4ebeebf 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -297,6 +297,10 @@ fn problem_15 () { matasano::unpad_pkcs7(b"ICE ICE BABY\x01\x02\x03\x04"), None ); + assert_eq!( + matasano::unpad_pkcs7(b"ICE ICE BABY\x00"), + None + ); assert_eq!( matasano::unpad_pkcs7(b"\x04\x04\x04\x04"), Some(&b""[..]) -- cgit v1.2.3-54-g00ecf