From 1d99598ca3f21dd863c8d63698f8af2b3b77759b Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Tue, 22 Jan 2008 12:46:51 +0100 Subject: [PATCH] Avoid use of uninitialized memory (This used to be commit 85123aacdb13e97c3f44aeded1c80e13af53d83d) --- source3/lib/version.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source3/lib/version.c b/source3/lib/version.c index 38c4f45ac6a..dff45f62597 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()); } -- 2.11.4.GIT