diff options
Diffstat (limited to 'source3/tdb/tdbback.c')
-rw-r--r-- | source3/tdb/tdbback.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source3/tdb/tdbback.c b/source3/tdb/tdbback.c index 9466c29991..68b6fadc88 100644 --- a/source3/tdb/tdbback.c +++ b/source3/tdb/tdbback.c @@ -55,8 +55,7 @@ char *add_suffix(const char *name, const char *suffix) fprintf(stderr,"Out of memory!\n"); exit(1); } - strncpy(ret, name, len); - strncat(ret, suffix, len); + snprintf(ret, len, "%s%s", name, suffix); return ret; } |