Fixed slapd extended op referrals (ITS#2678, ITS#2781)
Fixed slurpd memory leaks (ITS#2423, ITS#2620)
Fixed back-bdb compatibility with BDB 4.2 (ITS#2848)
+ Fixed lunicode insufficient buffer allocation bug (ITS#2727)
Fixed libldap_r pthread support (ITS#2820)
Fixed slapd berbuf align bugs
Added lutil_passwd extensions
return ber_dupbv( newbv, bv );
}
- /* FIXME: Should first check to see if string is already in
- * proper normalized form. This is almost as time consuming
- * as the normalization though.
+ /* Should first check to see if string is already in proper
+ * normalized form. This is almost as time consuming as
+ * the normalization though.
*/
/* finish off everything up to character before first non-ascii */
out[outpos++] = TOLOWER( s[i-1] );
}
if ( i == len ) {
- out[outpos++] = TOLOWER( s[len - 1] );
+ out[outpos++] = TOLOWER( s[len-1] );
out[outpos] = '\0';
return ber_str2bv( out, outpos, 0, newbv);
}
last = i;
+ /* Allocate more space in out if necessary */
+ if (len - i >= outsize - outpos) {
+ outsize += 1 + ((len - i) - (outsize - outpos));
+ outtmp = (char *) realloc(out, outsize);
+ if (outtmp == NULL) {
+ free(out);
+ free(ucs);
+ return NULL;
+ }
+ out = outtmp;
+ }
+
/* s[i] is ascii */
/* finish off everything up to char before next non-ascii */
for ( i++; (i < len) && LDAP_UTF8_ISASCII(s + i); i++ ) {
break;
}
} else if (((len < l1) && !LDAP_UTF8_ISASCII(s1)) ||
- ((len < l2) && !LDAP_UTF8_ISASCII(s2))) {
+ ((len < l2) && !LDAP_UTF8_ISASCII(s2)))
+ {
break;
}
return res;
l2 -= i - 1;
}
- /* FIXME: Should first check to see if strings are already in
+ /* Should first check to see if strings are already in
* proper normalized form.
*/
-
ucs = malloc( ( ( norm1 || l1 > l2 ) ? l1 : l2 ) * sizeof(*ucs) );
if ( ucs == NULL ) {
return l1 > l2 ? 1 : -1; /* what to do??? */