Commit b8059eb5 authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[snapshot] use strncmp to compare version string.

R=jgruber@chromium.org

Bug: chromium:803591/
Change-Id: I3f2d1126df4362c2f434551a28953a1bdebfeff5
Reviewed-on: https://chromium-review.googlesource.com/894523Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51050}
parent 73e7def9
......@@ -340,8 +340,8 @@ void Snapshot::CheckVersion(const v8::StartupData* data) {
CHECK_LT(kVersionStringOffset + kVersionStringLength,
static_cast<uint32_t>(data->raw_size));
Version::GetString(Vector<char>(version, kVersionStringLength));
if (memcmp(version, data->data + kVersionStringOffset,
kVersionStringLength) != 0) {
if (strncmp(version, data->data + kVersionStringOffset,
kVersionStringLength) != 0) {
V8_Fatal(__FILE__, __LINE__,
"Version mismatch between V8 binary and snapshot.\n"
"# V8 binary version: %.*s\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment