diff options
author | Volker Lendecke <vl@samba.org> | 2008-01-22 12:46:51 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-01-22 12:46:51 +0100 |
commit | 1d99598ca3f21dd863c8d63698f8af2b3b77759b (patch) | |
tree | dc101fd7ab5a84ae125b18f3877d69e68061a817 /source3 | |
parent | 559603ad693ede382c566cb8bbd8e6bd8d5750a6 (diff) | |
download | samba-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.c | 5 |
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()); } |