interesting fact about StrCaseCmp
Andrew Bartlett
abartlet at samba.org
Tue Feb 18 00:33:19 GMT 2003
On Tue, 2003-02-18 at 11:01, Martin Pool wrote:
> StrCaseCmp (and strequal) in HEAD has the interesting side-effect that it only
> compares the first PSTRING_LEN (1024) bytes of the strings.
>
> I suppose comparing strings longer than that is probably a bit
> unlikely, but it still seems kind of dangerous.
>
> Would it be OK to change it to use dynamic allocation?
I think so.
Possibly only for long strings? But then that is probably
micro-optimization.
Andrew Bartlett
--
Andrew Bartlett abartlet at pcug.org.au
Manager, Authentication Subsystems, Samba Team abartlet at samba.org
Student Network Administrator, Hawker College abartlet at hawkerc.net
http://samba.org http://build.samba.org http://hawkerc.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.samba.org/archive/samba-technical/attachments/20030218/30bf0dd4/attachment.bin
More information about the samba-technical
mailing list