Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(575)

Unified Diff: webkit/plugins/ppapi/ppapi_plugin_instance.cc

Issue 11304010: Fix type punning error in (de)serializing audio frames. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase only Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/plugins/ppapi/ppapi_plugin_instance.cc
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 749f46926c442cdc6bf4e7f55623645f0673e900..cd78ea8db33873f5b3880ad0c07ca198c5f09fc2 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -418,11 +418,11 @@ bool DeserializeAudioFrames(PP_Resource audio_frames,
if (bytes_left < kHeaderSize)
return false;
- timestamp = *(reinterpret_cast<const int64*>(cur));
+ memcpy(&timestamp, cur, sizeof(timestamp));
cur += sizeof(timestamp);
bytes_left -= sizeof(timestamp);
- frame_size = *(reinterpret_cast<const int64*>(cur));
+ memcpy(&frame_size, cur, sizeof(frame_size));
cur += sizeof(frame_size);
bytes_left -= sizeof(frame_size);
« no previous file with comments | « webkit/media/crypto/ppapi/ffmpeg_cdm_audio_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698