X-Git-Url: http://git.silcnet.org/gitweb/?a=blobdiff_plain;f=apps%2Fsilcd%2Fserverconfig.c;h=4c576383f04a799756b6d0b4ff53e8794dcf152f;hb=fbcba64240f0accf54c44249df6b03652bb86dfc;hp=177f58264afe1b91e6385496fab78fd975fda0a1;hpb=ea35a2214bc62cbdb314cd28f389fd78fe3a31e0;p=silc.git diff --git a/apps/silcd/serverconfig.c b/apps/silcd/serverconfig.c index 177f5826..4c576383 100644 --- a/apps/silcd/serverconfig.c +++ b/apps/silcd/serverconfig.c @@ -122,9 +122,10 @@ static bool my_parse_authdata(SilcAuthMethod auth_meth, char *p, /* p is a plain text password */ if (auth_data && auth_data_len) { if (!silc_utf8_valid(p, strlen(p))) { - *auth_data_len = silc_utf8_encoded_len(p, strlen(p), 0); + *auth_data_len = silc_utf8_encoded_len(p, strlen(p), + SILC_STRING_LANGUAGE); *auth_data = silc_calloc(*auth_data_len, sizeof(unsigned char)); - silc_utf8_encode(p, strlen(p), SILC_STRING_ASCII, *auth_data, + silc_utf8_encode(p, strlen(p), SILC_STRING_LANGUAGE, *auth_data, *auth_data_len); } else { *auth_data = (void *) strdup(p);