Skip to content

Commit 98d5e45

Browse files
authored
Merge pull request #209 from Mellanox/master_devel
mstarchive fix for 4.13.0 release
2 parents 5f6ed0b + a9aa3ae commit 98d5e45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlxarchive/mlxarchive_mfa2_extension.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ string VersionExtension::getVersion(bool pad_sub_minor) const {
159159
stringstream ss;
160160
string res;
161161
if (pad_sub_minor){
162-
char _sub_minor_str[4];
163-
sprintf(_sub_minor_str, "%04d", (int)_subMinor);
162+
char _sub_minor_str[5] = "";
163+
snprintf(_sub_minor_str, 5, "%04d", (int)_subMinor);
164164
ss << (int)_major << '.' << (int)_minor << '.' << _sub_minor_str;
165165
}
166166
else {

0 commit comments

Comments
 (0)