]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Password does not need to be null-terminated, do not print garbage in
authorPavel Machek <pavel@ucw.cz>
Sat, 21 Sep 2002 13:57:48 +0000 (13:57 +0000)
committerPavel Machek <pavel@ucw.cz>
Sat, 21 Sep 2002 13:57:48 +0000 (13:57 +0000)
such case. Thanks to silvio@big.net.

proto/rip/auth.c

index c23872bea25a3f3c39e99e6416d409673dfee2e6..8aafe2e00d8f0c57e12e58492f5de04f15bb6f11 100644 (file)
@@ -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;
       }
     }