Skip to content

Commit

Permalink
Fix using strlen with non-NUL terminated string
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Oct 6, 2021
1 parent 7d2d43a commit 9435842
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/arkreactor/VM/State.cpp
Expand Up @@ -232,7 +232,7 @@ namespace Ark
std::string str_version = std::to_string(major) + "." +
std::to_string(minor) + "." +
std::to_string(patch);
throwStateError("Compiler and VM versions don't match: " + str_version + " and " + ARK_VERSION_STR);
throwStateError("Compiler and VM versions don't match: " + str_version + " and " + std::string(ARK_VERSION_STR, sizeof(ARK_VERSION_STR)));
}

using timestamp_t = unsigned long long;
Expand Down

0 comments on commit 9435842

Please sign in to comment.