summaryrefslogtreecommitdiff
path: root/lib/util/substitute.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util/substitute.c')
-rw-r--r--lib/util/substitute.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/util/substitute.c b/lib/util/substitute.c
index 500d12777f9..30b4e00dc53 100644
--- a/lib/util/substitute.c
+++ b/lib/util/substitute.c
@@ -146,7 +146,11 @@ _PUBLIC_ char *string_sub_talloc(TALLOC_CTX *mem_ctx, const char *s,
if (ret == NULL)
return NULL;
- SMB_ASSERT(ret[len] == '\0');
+ if (ret[len] != '\0') {
+ DEBUG(0,("Internal error at %s(%d): string not terminated\n",
+ __FILE__, __LINE__));
+ abort();
+ }
talloc_set_name_const(ret, ret);