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)
commit44d304f84c4ba5a832d5e3848ae0d04d5438ac15
tree505f8034388f759f34989aadbd8a848906f427b1
parent94a272b9a881ec0004c5da2a7242b0a818da5630
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
source/lib/util_str.c