summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/extensions/api/messaging/native_message_process_host.cc3
-rw-r--r--chrome/tools/ipclist/ipcfuzz.cc2
2 files changed, 2 insertions, 3 deletions
diff --git a/chrome/browser/extensions/api/messaging/native_message_process_host.cc b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
index c431811..07fb1bd 100644
--- a/chrome/browser/extensions/api/messaging/native_message_process_host.cc
+++ b/chrome/browser/extensions/api/messaging/native_message_process_host.cc
@@ -165,8 +165,7 @@ bool NativeMessageProcessHost::WriteMessage(MessageType type,
// Make sure that the pickle doesn't do any unexpected padding.
CHECK(8 + message.length() == pickle.payload_size());
- if (!WriteData(write_file_, const_cast<const Pickle*>(&pickle)->payload(),
- pickle.payload_size())) {
+ if (!WriteData(write_file_, pickle.payload(), pickle.payload_size())) {
LOG(ERROR) << "Error writing message to the native client.";
return false;
}
diff --git a/chrome/tools/ipclist/ipcfuzz.cc b/chrome/tools/ipclist/ipcfuzz.cc
index 87fe2c2..5006307 100644
--- a/chrome/tools/ipclist/ipcfuzz.cc
+++ b/chrome/tools/ipclist/ipcfuzz.cc
@@ -501,7 +501,7 @@ struct FuzzTraits<gfx::Rect> {
class PickleCracker : public Pickle {
public:
static void CopyMessageID(PickleCracker *dst, PickleCracker *src) {
- memcpy(dst->payload(), src->payload(), sizeof(int));
+ memcpy(dst->mutable_payload(), src->payload(), sizeof(int));
}
};