summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-28 09:14:07 -0700
committerStephen Hemminger <stephen.hemminger@vyatta.com>2008-05-28 09:14:07 -0700
commit8583ab7c9aaff066a45e477c9c25d921a02ce923 (patch)
tree49ce4f55e6778859ca8ab064d9c4e66ca567776e
parent6e69833249b701330913d80bd9b3c7c991ee61d5 (diff)
downloadquagga-8583ab7c9aaff066a45e477c9c25d921a02ce923.tar.bz2
quagga-8583ab7c9aaff066a45e477c9c25d921a02ce923.tar.xz
Handle empty auth string properly
Compiler warned about dubious code where test was: char auth_str[]; ... if (!auth_str) return 0; Looks like what was meant was testing for empty auth string.
-rw-r--r--ripd/ripd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ripd/ripd.c b/ripd/ripd.c
index c5e42705..62d8691c 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -926,7 +926,7 @@ rip_auth_md5 (struct rip_packet *packet, struct sockaddr_in *from,
else if (ri->auth_str)
strncpy (auth_str, ri->auth_str, RIP_AUTH_MD5_SIZE);
- if (! auth_str)
+ if (auth_str[0] == 0)
return 0;
/* MD5 digest authentication. */