summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/util_str.c2
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));