From: Pekka Riikonen Date: Sat, 30 Sep 2000 14:11:40 +0000 (+0000) Subject: updates X-Git-Tag: SILC.0.1~384 X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=commitdiff_plain;h=0b85663b14a1f12935300e56fdbb614acc10ca79 updates --- diff --git a/CHANGES b/CHANGES index 43126dd0..8e9b2a37 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,11 @@ +Sat Sep 30 16:57:42 EEST 2000 Pekka Riikonen + + * Removed the function just added to lib/silcutil/silcschedule.[ch]. + + * Cras fixed and optimized the packet handling even further and + it should work now. Minor change to the prototype of function + silc_packet_receive_process in lib/silccore/silcpacket.[ch]. + Sat Sep 30 08:48:47 EEST 2000 Pekka Riikonen * Added new function into lib/silcutil/silcschedule.[ch]: diff --git a/configure.in b/configure.in index c057ff87..b5e8a441 100644 --- a/configure.in +++ b/configure.in @@ -33,7 +33,7 @@ case "$target" in ;; esac -AM_INIT_AUTOMAKE(silc, 29092000) +AM_INIT_AUTOMAKE(silc, 30092000) AC_PREREQ(2.3) AM_CONFIG_HEADER(includes/silcdefs.h) diff --git a/lib/silccore/silcpacket.c b/lib/silccore/silcpacket.c index d01e1baa..3642ddb8 100644 --- a/lib/silccore/silcpacket.c +++ b/lib/silccore/silcpacket.c @@ -368,12 +368,17 @@ void silc_packet_receive_process(SilcSocketConnection sock, SilcPacketParserContext *parse_ctx; int packetlen, paddedlen, count, mac_len = 0; + /* We need at least 2 bytes of data to be able to start processing + the packet. */ + if (sock->inbuf->len < 2) + return; + if (hmac) mac_len = hmac->hash->hash->hash_len; /* Parse the packets from the data */ count = 0; - while (sock->inbuf->len > 2) { + while (sock->inbuf->len > 0) { SILC_PACKET_LENGTH(sock->inbuf, packetlen, paddedlen); paddedlen += 2; count++;