summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-01-22 12:46:51 +0100
committerVolker Lendecke <vl@samba.org>2008-01-22 12:46:51 +0100
commit1d99598ca3f21dd863c8d63698f8af2b3b77759b (patch)
treedc101fd7ab5a84ae125b18f3877d69e68061a817 /source3
parent559603ad693ede382c566cb8bbd8e6bd8d5750a6 (diff)
downloadsamba-1d99598ca3f21dd863c8d63698f8af2b3b77759b.tar.gz
samba-1d99598ca3f21dd863c8d63698f8af2b3b77759b.tar.bz2
samba-1d99598ca3f21dd863c8d63698f8af2b3b77759b.zip
Avoid use of uninitialized memory
(This used to be commit 85123aacdb13e97c3f44aeded1c80e13af53d83d)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/version.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/lib/version.c b/source3/lib/version.c
index 38c4f45ac6..dff45f6259 100644
--- a/source3/lib/version.c
+++ b/source3/lib/version.c
@@ -84,7 +84,10 @@ void samba_extended_info_version(struct smb_extended_info *extended_info)
/* FIXME: samba_gitcommitdate should contain the git commit date. */
unix_to_nt_time(&extended_info->samba_gitcommitdate, time(NULL));
+ memset(extended_info->samba_version_string, 0,
+ sizeof(extended_info->samba_version_string));
+
snprintf (extended_info->samba_version_string,
- SAMBA_EXTENDED_INFO_VERSION_STRING_LENGTH,
+ sizeof(extended_info->samba_version_string),
"%s", samba_version_string());
}