From 19bd5c8e2c0fd47ff27668b8c45acc79f4d703b4 Mon Sep 17 00:00:00 2001 From: Pavel Machek Date: Sat, 21 Sep 2002 13:57:48 +0000 Subject: [PATCH] Password does not need to be null-terminated, do not print garbage in such case. Thanks to silvio@big.net. --- proto/rip/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/rip/auth.c b/proto/rip/auth.c index c23872be..8aafe2e0 100644 --- a/proto/rip/auth.c +++ b/proto/rip/auth.c @@ -44,7 +44,7 @@ rip_incoming_authentication( struct proto *p, struct rip_block_auth *block, stru } if (strncmp( (char *) (&block->packetlen), passwd->password, 16)) { log( L_AUTH "Passwd authentication failed!" ); - DBG( "Expected %s, got %s\n", passwd->password, &block->packetlen ); + DBG( "Expected %s, got %.16s\n", passwd->password, &block->packetlen ); return 1; } }