DragonFlyBSD Kernel Audit
DF-0968 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/crypto/rijndael/rijndael-api-fst.c b/sys/crypto/rijndael/rijndael-api-fst.c
--- a/sys/crypto/rijndael/rijndael-api-fst.c
+++ b/sys/crypto/rijndael/rijndael-api-fst.c
@@ -92,6 +92,9 @@
 	}
 	if (input == NULL || inputLen <= 0) {
 		return 0; /* nothing to do */
+	}
+	if (inputLen % 128 != 0) {
+		return BAD_BLOCK_LENGTH;
 	}
 
 	numBlocks = inputLen/128;