From: Frederic Marchal Date: Wed, 29 May 2013 19:20:45 +0000 (+0200) Subject: Iconv converts the terminating NUL in the LDAP string X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=26ed86a95f8ed47afeea679ba1cebe3b7f1bb843;p=thirdparty%2Fsarg.git Iconv converts the terminating NUL in the LDAP string The LDAP string was not completely converted and was lacking the terminating zero. --- diff --git a/usertab.c b/usertab.c index 780c200..f943685 100644 --- a/usertab.c +++ b/usertab.c @@ -216,11 +216,11 @@ const char * charset_convert( const char * str_in, const char * charset_to ) size_t str_in_len; size_t str_out_len; - str_in_len = strlen( str_in ); + str_in_len = strlen( str_in ) + 1;//process the terminating NUL too str_out_len = ( 2 * str_in_len ); if (ldapconvbuffer==NULL || ldapconvbuffersize