Age | Commit message (Collapse) | Author | Files | Lines |
|
The only caller of push_string() (not to be confused with
push_string_check()) in the common code was encode_pw_buffer(), and it
didn't use the alignment or STR_UPPER flags.
The talloc_strupper() and talloc_strlower() functions are tested in
smbtorture, and are next_codepoint() based.
Andrew Bartlett
|
|
This function is problematic because a string may expand in size when
changed into upper or lower case. This will then push characters off
the end of the string in the s3 implementation, or panic in the former
s4 implementation.
Andrew Bartlett
|
|
These were copied from source3/lib/charcnv.c
Andrew Bartlett
|
|
This brings another layer of the charcnv library in common.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Apr 14 09:21:59 CEST 2011 on sn-devel-104
|
|
Signed-off-by: Jeremy Allison <jra@samba.org>
|
|
This adds an interface that matches the source3/ convert string code.
Andrew Bartlett
Signed-off-by: Andrew Tridgell <tridge@samba.org>
|
|
This adds tests for:
strncasecmp_m
strcasecmp_m
strupper_talloc_n
strlower_talloc
strhaslower
strhasupper
The tests can certainly be improved with pre-calculated upper and
lower case text, but this at least puts them though their paces.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Mar 31 14:24:22 CEST 2011 on sn-devel-104
|
|
Makes these interfaces much harder to misuse and easier to ensure error
checking.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
|
|
This better reflects what this structure is
Andrew Bartlett
|
|
convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems
Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
|
|
These functions now use the codepoints for more accurate string
handling and now form common code.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar 23 08:21:54 CET 2011 on sn-devel-104
|
|
We now use the struct smb_iconv_convenience at the core of all our
iconv code, and use global_iconv_convenience for the callers that
don't specify one.
Andrew Bartlett
|
|
|
|
strlen_m_ext() counting terminator
|
|
charset
The function calculates the number of units (8 or 16-bit, depending
on the destination charset), that would be needed to convert the
input string which is expected to be in in src_charset encoding
to the dst_charset (which should be a unicode charset).
|
|
next_codepoint() takes as string in CH_UNIX encoding and returns the
unicode codepoint of the next (possibly multibyte) character of the
input string.
The new next_codepoint_ext() function adds the encoding of the input
string as a parameter. next_codepoint() now only calls next_codepoint_ext()
with CH_UNIX als src_charset argument.
|
|
We had a crash bug where a cached copy of a iconv convenience pointer
was used after being freed when loadparm asked for iconv to
reload. This could happen if a python module used a iconv based
function before loadparm was completed.
The fix is to ensure that any use of this pointer remains valid, by
reusing the pointer itself when it has already been initialised, but
filling in the child elements with the updated values.
|
|
Prevents strlower_talloc from segfaulting if you pass it a NULL string.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
|
|
We need to check the length before the value
|
|
|
|
|
|
|
|
|
|
|
|
|
|
consistency with Samba 3.
|
|
Guenther
|
|
|
|
|
|
|
|
make them wrappers around convert_string{,talloc}_convenience().
|
|
|
|
functions.
|
|
|
|
|
|
|