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

Unified Diff: native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc

Issue 1062463004: [NaCl SDK] nacl_io: Fix use-after-free bug in html5fs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 | native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc
diff --git a/native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc b/native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc
index 3b04296841b76f170912288bb482ee4e01ad5807..b7f91351ecfc8f950440d7c6dfc001200813c916 100644
--- a/native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc
+++ b/native_client_sdk/src/libraries/nacl_io/devfs/dev_fs.cc
@@ -248,7 +248,8 @@ Error DevFs::OpenWithMode(const Path& path, int open_flags,
if (path.Size() == 3) {
error = fs_dir_->FindChild(path.Part(2), out_node);
} else {
- LOG_TRACE("Bad devfs path: %s", path.Join().c_str());
+ std::string path_str(path.Join());
khim 2015/04/17 21:20:05 Fly-by comment: why "std:sttring" here? Why not "c
binji 2015/04/20 22:35:28 Done.
+ LOG_TRACE("Bad devfs path: %s", path_str.c_str());
error = ENOENT;
}
} else {
@@ -257,7 +258,8 @@ Error DevFs::OpenWithMode(const Path& path, int open_flags,
// Only return EACCES when trying to create a node that does not exist.
if ((error == ENOENT) && (open_flags & O_CREAT)) {
- LOG_TRACE("Cannot create devfs node: %s", path.Join().c_str());
+ std::string path_str(path.Join());
+ LOG_TRACE("Cannot create devfs node: %s", path_str.c_str());
return EACCES;
}
« no previous file with comments | « no previous file | native_client_sdk/src/libraries/nacl_io/fusefs/fuse_fs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698