summaryrefslogtreecommitdiff
path: root/source3/lib/version.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-01-30 17:42:42 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:19 -0500
commit8724ea7ef51923fbd7f79dc3b070f0d462d78ac6 (patch)
tree86e0cd667a9516356d0175ab2124903264d4aff3 /source3/lib/version.c
parent7de55b30b739ac59f22c9e8ed91e36662e5b5b12 (diff)
downloadsamba-8724ea7ef51923fbd7f79dc3b070f0d462d78ac6.tar.gz
samba-8724ea7ef51923fbd7f79dc3b070f0d462d78ac6.tar.bz2
samba-8724ea7ef51923fbd7f79dc3b070f0d462d78ac6.zip
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)
Diffstat (limited to 'source3/lib/version.c')
-rw-r--r--source3/lib/version.c6
1 files changed, 4 insertions, 2 deletions
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;