diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-07-19 00:36:43 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-07-19 00:36:43 +0000 |
commit | e45b66ba8a6b6fd669ce7b4f9f8f84f9c26e1575 (patch) | |
tree | d2e2aee395ac04d8687f0d28361b80c8d5fffc1f /source3/registry/reg_db.c | |
parent | fb56f58fbc78efbfa6e5a552946ab792e45380a1 (diff) | |
download | samba-e45b66ba8a6b6fd669ce7b4f9f8f84f9c26e1575.tar.gz samba-e45b66ba8a6b6fd669ce7b4f9f8f84f9c26e1575.tar.bz2 samba-e45b66ba8a6b6fd669ce7b4f9f8f84f9c26e1575.zip |
Fix StrCaseCmp() to avoid calling smb_panic() on invalid multibyte strings.
This fix results in
- we no longer use fixed-size buffers in StrCaseCmp (previously limited to
a pstring)
- we return strcmp(s, t) if either of the strings is invalid
- for non-ascii cases, we call iconv twice, not 4 times.
The basic idea with this fix is that if a string is not valid in the currnet
charset, then (unless it is byte-equivilant) it cannot be case-equivilant
to any other string.
This should address the majority of our smb_panic() cases on this matter. It
will not fix them all - we still call unix_strupper(), aka strupper_m()
elsewhere, but this was being called on every file in the directory when
we performed unix_convert().
Tested with the stf unit tests for this routine.
Andrew Bartlett
(This used to be commit 9918fa73145a22b1d7adf001f0a9cf0e1bda4136)
Diffstat (limited to 'source3/registry/reg_db.c')
0 files changed, 0 insertions, 0 deletions