projects
/
silc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7624fe8
)
Packet engine: do not do the padding length check for CTR mode.
author
Pekka Riikonen
<priikone@silcnet.org>
Sat, 13 Dec 2008 19:27:01 +0000
(21:27 +0200)
committer
Pekka Riikonen
<priikone@silcnet.org>
Sat, 13 Dec 2008 19:27:01 +0000
(21:27 +0200)
lib/silccore/silcpacket.c
patch
|
blob
|
history
diff --git
a/lib/silccore/silcpacket.c
b/lib/silccore/silcpacket.c
index 9a44f87c9f74948fce9202b1fcfc43bbcf6fba14..767ec927a4712a9f24575571cea1a4a45de51724 100644
(file)
--- a/
lib/silccore/silcpacket.c
+++ b/
lib/silccore/silcpacket.c
@@
-2198,7
+2198,8
@@
static void silc_packet_read_process(SilcPacketStream stream)
SILC_PACKET_LENGTH(header, packetlen, paddedlen);
/* Padding sanity checks */
- if (cipher && (paddedlen % block_len) != 0) {
+ if (cipher && silc_cipher_get_mode(cipher) != SILC_CIPHER_MODE_CTR &&
+ (paddedlen % block_len) != 0) {
SILC_LOG_DEBUG(("Packet length %d not multiple by cipher block length",
paddedlen));
silc_mutex_unlock(stream->lock);