From 8724ea7ef51923fbd7f79dc3b070f0d462d78ac6 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Mon, 30 Jan 2006 17:42:42 +0000 Subject: r13231: apparently strncat() is converted to strcat() on RH7.3 and similar systems. Fix the build on those boxes (This used to be commit 0b8ed8136b5c5b9b7bb5615dc8dc27eec7c49506) --- source3/lib/version.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/version.c b/source3/lib/version.c index 3bd8304012..a20d650025 100644 --- a/source3/lib/version.c +++ b/source3/lib/version.c @@ -29,6 +29,7 @@ const char *samba_version_string(void) static fstring samba_version; fstring tmp_version; static BOOL init_samba_version; + size_t remaining; if (init_samba_version) return samba_version; @@ -38,8 +39,9 @@ const char *samba_version_string(void) SAMBA_VERSION_VENDOR_SUFFIX); #ifdef SAMBA_VENDOR_PATCH - fstr_sprintf( tmp_version, "-%d", SAMBA_VENDOR_PATCH ); - fstrcat( samba_version, tmp_version ); + remaining = sizeof(samba_version)-strlen(samba_version); + snprintf( tmp_version, sizeof(tmp_version), "-%d", SAMBA_VENDOR_PATCH ); + strlcat( samba_version, tmp_version, remaining-1 ); #endif init_samba_version = True; -- cgit