projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
updates.
[silc.git]
/
lib
/
silccore
/
silcauth.c
diff --git
a/lib/silccore/silcauth.c
b/lib/silccore/silcauth.c
index 36c51e93dd3494eebb5a453c99cbc9fcdee50583..3ee76ca41eccfcf3f2d789a16f0546e1e23c2274 100644
(file)
--- a/
lib/silccore/silcauth.c
+++ b/
lib/silccore/silcauth.c
@@
-181,8
+181,7
@@
silc_auth_public_key_encode_data(SilcPublicKey public_key,
SILC_STR_UI_XNSTRING(pk, pk_len),
SILC_STR_END);
SILC_STR_UI_XNSTRING(pk, pk_len),
SILC_STR_END);
- ret = silc_calloc(buf->len + 1, sizeof(*ret));
- memcpy(ret, buf->data, buf->len);
+ ret = silc_memdup(buf->data, buf->len);
if (ret_len)
*ret_len = buf->len;
if (ret_len)
*ret_len = buf->len;
@@
-358,7
+357,7
@@
bool silc_auth_verify(SilcAuthPayload payload, SilcAuthMethod auth_method,
case SILC_AUTH_PASSWORD:
/* Passphrase based authentication. The `pkcs', `hash', `id' and `type'
arguments are not needed. */
case SILC_AUTH_PASSWORD:
/* Passphrase based authentication. The `pkcs', `hash', `id' and `type'
arguments are not needed. */
- if (!memcmp(payload->auth_data, auth_data,
payload->auth
_len)) {
+ if (!memcmp(payload->auth_data, auth_data,
auth_data
_len)) {
SILC_LOG_DEBUG(("Authentication successful"));
return TRUE;
}
SILC_LOG_DEBUG(("Authentication successful"));
return TRUE;
}