From 4bc4a97e36121fe884acb57957d9f41813d9bb3a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 18 Jul 2002 23:22:11 +0000 Subject: Fixed off-by-one in all_string_sub also. Jeremy. (This used to be commit 8b0e47fc1f00c76dfccb6c2b58188d9a5ae67c65) --- source3/lib/util_str.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/lib/util_str.c') diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index be96718205..c1d20ffd2c 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -801,7 +801,7 @@ void all_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 all_string_sub(%.50s, %d)\n", (int)(ls + (li-lp) - len), pattern, (int)len)); -- cgit