Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/crypto/rijndael Pull up revision 1.12 (requested by...
details: https://anonhg.NetBSD.org/src/rev/ff72a95191c8
branches: netbsd-1-6
changeset: 530813:ff72a95191c8
user: tron <tron%NetBSD.org@localhost>
date: Sat Oct 04 09:56:52 2003 +0000
description:
Pull up revision 1.12 (requested by tv in ticket #1460):
correct panic() condition - it was backwards.
From: Rafal Boni <rafal%attbi.com@localhost>
diffstat:
sys/crypto/rijndael/rijndael-api-fst.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (36 lines):
diff -r 3ef3b7ff245e -r ff72a95191c8 sys/crypto/rijndael/rijndael-api-fst.c
--- a/sys/crypto/rijndael/rijndael-api-fst.c Sat Oct 04 09:50:04 2003 +0000
+++ b/sys/crypto/rijndael/rijndael-api-fst.c Sat Oct 04 09:56:52 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rijndael-api-fst.c,v 1.10.10.1 2003/10/04 09:50:04 tron Exp $ */
+/* $NetBSD: rijndael-api-fst.c,v 1.10.10.2 2003/10/04 09:56:52 tron Exp $ */
/* $KAME: rijndael-api-fst.c,v 1.8 2001/03/02 05:53:05 itojun Exp $ */
/*
@@ -17,7 +17,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rijndael-api-fst.c,v 1.10.10.1 2003/10/04 09:50:04 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rijndael-api-fst.c,v 1.10.10.2 2003/10/04 09:56:52 tron Exp $");
#include <sys/param.h>
#ifdef _KERNEL
@@ -222,7 +222,7 @@
outBuffer += 16;
}
padLen = 16 - (inputOctets - 16*numBlocks);
- if (padLen > 0 && padLen <= 16)
+ if (padLen <= 0 || padLen > 16)
panic("rijndael_padEncrypt(ECB)");
memcpy(block, input, 16 - padLen);
for (cp = block + 16 - padLen; cp < block + 16; cp++)
@@ -243,7 +243,7 @@
outBuffer += 16;
}
padLen = 16 - (inputOctets - 16*numBlocks);
- if (padLen > 0 && padLen <= 16)
+ if (padLen <= 0 || padLen > 16)
panic("rijndael_padEncrypt(CBC)");
for (i = 0; i < 16 - padLen; i++) {
block[i] = input[i] ^ iv[i];
Home |
Main Index |
Thread Index |
Old Index