diff options
author | Gerald Carter <jerry@samba.org> | 2002-07-18 22:55:48 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2002-07-18 22:55:48 +0000 |
commit | 2afc1ca42c6a945fa1385328cd1c69065829d233 (patch) | |
tree | f2925cc0308d2c63019b2a81fb1e1db82f373892 /source3 | |
parent | 9154aa791ecdbad975ac23943af08ec2ef939f5e (diff) | |
download | samba-2afc1ca42c6a945fa1385328cd1c69065829d233.tar.gz samba-2afc1ca42c6a945fa1385328cd1c69065829d233.tar.bz2 samba-2afc1ca42c6a945fa1385328cd1c69065829d233.zip |
The previous code would not allow things like string_sub(str, "\\", "/", 0).
It complained about an overflow of 0 bytes.
Jeremy please check since you modified this last.
(This used to be commit a5aad760061e21635319a9b5628990cf59b827ed)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/util_str.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 88a72f1536..7da4358e66 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -670,7 +670,7 @@ void string_sub(char *s,const char *pattern, const char *insert, size_t len) len = ls; while (lp <= ls && (p = strstr(s,pattern))) { - if (ls + (li-lp) >= len) { + if (ls + (li-lp) > len) { DEBUG(0,("ERROR: string overflow by %d in string_sub(%.50s, %d)\n", (int)(ls + (li-lp) - len), pattern, (int)len)); |