1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00
Andrew Bartlett e45b66ba8a 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)
2003-07-19 00:36:43 +00:00
..
2003-07-18 11:36:16 +00:00
2003-05-26 23:52:48 +00:00
2003-07-11 03:30:18 +00:00
2003-07-18 09:05:30 +00:00
2003-06-13 00:07:59 +00:00
2003-07-11 05:33:40 +00:00
2003-07-16 04:53:57 +00:00
2003-05-13 04:38:09 +00:00
2003-05-26 16:54:39 +00:00
2003-04-02 06:00:22 +00:00
2003-05-22 00:49:24 +00:00