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

Unified Diff: native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc

Issue 414843004: [NaCl SDK] nacl_io: fix invalid access to string data. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc b/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc
index 430e49f4ae26c04e315dbc4904f26af769117b5f..f7a622fd7467226e3963461f0610f0e73d8dabd8 100644
--- a/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc
+++ b/native_client_sdk/src/libraries/nacl_io/html5fs/html5_fs.cc
@@ -147,15 +147,17 @@ Error Html5Fs::Rename(const Path& path, const Path& newpath) {
if (error)
return error;
- const char* oldpath_full = GetFullPath(path).Join().c_str();
+ std::string oldpath_full = GetFullPath(path).Join();
ScopedResource fileref_resource(
- ppapi(), file_ref_iface_->Create(filesystem_resource_, oldpath_full));
+ ppapi(),
+ file_ref_iface_->Create(filesystem_resource_, oldpath_full.c_str()));
if (!fileref_resource.pp_resource())
return ENOENT;
- const char* newpath_full = GetFullPath(newpath).Join().c_str();
+ std::string newpath_full = GetFullPath(newpath).Join();
ScopedResource new_fileref_resource(
- ppapi(), file_ref_iface_->Create(filesystem_resource_, newpath_full));
+ ppapi(),
+ file_ref_iface_->Create(filesystem_resource_, newpath_full.c_str()));
if (!new_fileref_resource.pp_resource())
return ENOENT;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698