X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fcommand.c;h=49904b7235c5cbf11c965c4ff572bef1facacc40;hb=2eb7e56fca4eb05b83a945df2d560d581c26bdc8;hp=b1aaea08ee31c6ea4dcf6443bba1c8dde41c379b;hpb=58022e77a6a974d7e44453832fb4d9e396d7a3d0;p=silc.git diff --git a/apps/silcd/command.c b/apps/silcd/command.c index b1aaea08..49904b72 100644 --- 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]; - unsigned char *fingerprint; + unsigned char *fingerprint, fempty[20]; 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) @@ -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); - 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;