projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed fingerprint emptines checking. Bug #18.
[silc.git]
/
apps
/
silcd
/
command.c
diff --git
a/apps/silcd/command.c
b/apps/silcd/command.c
index b1aaea08ee31c6ea4dcf6443bba1c8dde41c379b..49904b7235c5cbf11c965c4ff572bef1facacc40 100644
(file)
--- a/
apps/silcd/command.c
+++ b/
apps/silcd/command.c
@@
-742,7
+742,7
@@
silc_server_command_whois_send_reply(SilcServerCommandContext cmd,
SilcUInt16 ident = silc_command_get_ident(cmd->payload);
char nh[256], uh[256];
unsigned char idle[4], mode[4];
SilcUInt16 ident = silc_command_get_ident(cmd->payload);
char nh[256], uh[256];
unsigned char idle[4], mode[4];
- unsigned char *fingerprint;
+ unsigned char *fingerprint
, fempty[20]
;
SilcSocketConnection hsock;
if (nickname) {
SilcSocketConnection hsock;
if (nickname) {
@@
-764,6
+764,8
@@
silc_server_command_whois_send_reply(SilcServerCommandContext cmd,
}
}
}
}
+ memset(fempty, 0, sizeof(fempty));
+
/* Start processing found clients. */
status = SILC_STATUS_OK;
if (valid_count > 1)
/* Start processing found clients. */
status = SILC_STATUS_OK;
if (valid_count > 1)
@@
-817,7
+819,7
@@
silc_server_command_whois_send_reply(SilcServerCommandContext cmd,
channels = silc_server_get_client_channel_list(server, entry, TRUE,
TRUE, &umode_list);
channels = silc_server_get_client_channel_list(server, entry, TRUE,
TRUE, &umode_list);
- if (
entry->data.fingerprint[0] != 0 && entry->data.fingerprint[1] != 0
)
+ if (
memcmp(entry->data.fingerprint, fempty, sizeof(fempty))
)
fingerprint = entry->data.fingerprint;
else
fingerprint = NULL;
fingerprint = entry->data.fingerprint;
else
fingerprint = NULL;