summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>1999-05-31 21:22:40 +0200
committerPavel Machek <pavel@ucw.cz>1999-05-31 21:22:40 +0200
commitbf97bd28276af42aa59ea29b926b4848ae14e149 (patch)
treea9763351c48679eddadf1b44ab31f2b6bbc86d28
parent91c7c7416b4a18ac2b9e872c2a1a6391cf8b3dc8 (diff)
downloadbird-bf97bd28276af42aa59ea29b926b4848ae14e149.tar
bird-bf97bd28276af42aa59ea29b926b4848ae14e149.zip
Cleanup of warnings
-rw-r--r--proto/rip/auth.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/proto/rip/auth.c b/proto/rip/auth.c
index dbfdf8b..3dbec83 100644
--- a/proto/rip/auth.c
+++ b/proto/rip/auth.c
@@ -50,21 +50,20 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru
struct password_item *head;
struct rip_md5_tail *tail;
- tail = (char *) packet + (block->packetlen - sizeof(struct rip_block_auth));
+ tail = (struct rip_md5_tail *) ((char *) packet + (block->packetlen - sizeof(struct rip_block_auth)));
head = P_CF->passwords;
while (head) {
if (head->id == block->keyid) {
struct MD5Context ctxt;
- int i;
char md5sum_packet[16];
char md5sum_computed[16];
- memcpy(md5sum_packet, tail->md5, i);
+ memcpy(md5sum_packet, tail->md5, 16);
password_strncpy(tail->md5, head->password, 16);
MD5Init(&ctxt);
- MD5Update(&ctxt, packet, block->packetlen );
+ MD5Update(&ctxt, (char *) packet, block->packetlen );
MD5Final(md5sum_computed, &ctxt);
if (memcmp(md5sum_packet, md5sum_computed, 16))