win: Fix x64 compile error in handle writer

R=mark@chromium.org
BUG=crashpad:52

Review URL: https://codereview.chromium.org/1408073005 .
This commit is contained in:
Scott Graham 2015-10-21 15:35:57 -07:00
parent 1407b21d69
commit 38b7e919f8

View File

@ -20,6 +20,7 @@
#include "base/stl_util.h"
#include "minidump/minidump_extensions.h"
#include "util/file/file_writer.h"
#include "util/numeric/safe_assignment.h"
namespace crashpad {
@ -76,7 +77,12 @@ bool MinidumpHandleDataWriter::Freeze() {
handle_data_stream_base_.SizeOfHeader = sizeof(handle_data_stream_base_);
handle_data_stream_base_.SizeOfDescriptor = sizeof(handle_descriptors_[0]);
handle_data_stream_base_.NumberOfDescriptors = handle_descriptors_.size();
const size_t handle_count = handle_descriptors_.size();
if (!AssignIfInRange(&handle_data_stream_base_.NumberOfDescriptors,
handle_count)) {
LOG(ERROR) << "handle_count " << handle_count << " out of range";
return false;
}
handle_data_stream_base_.Reserved = 0;
return true;