JRA's recent strstr_m work really badly broke our string_sub code.
authorAndrew Bartlett <abartlet@samba.org>
Tue, 9 Mar 2004 09:56:33 +0000 (09:56 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 9 Mar 2004 09:56:33 +0000 (09:56 +0000)
commit151faf6935d54efcc3b5bcf8e60419b490ac460d
tree4796007272c7ae72366c9b392ee70fa7c5f74ccb
parentc9b7cbbfa572512cd0348817965b99fd1df01285
JRA's recent strstr_m work really badly broke our string_sub code.

For example:

strstr_m("%v foo bar", "%v") would fail...

only strstr_m("foo %v", "%v") could work.

I wonder what else this broke...

Fix is to move to using strncmp() inside the strstr_m function.

Tested on ASCII only.

Andrew Bartlett
(This used to be commit 44d304f84c4ba5a832d5e3848ae0d04d5438ac15)
source3/lib/util_str.c