size_limit_ member of minidump_descriptor ignored in copy constructor

Patch by Avishai Hendel <avish@fb.com>, R=mkrebs at https://codereview.appspot.com/7305060/

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1114 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
ted.mielczarek@gmail.com 2013-02-14 14:03:54 +00:00
parent 0513eeca07
commit 24c9dfed8a
2 changed files with 4 additions and 2 deletions

View File

@ -38,7 +38,8 @@ namespace google_breakpad {
MinidumpDescriptor::MinidumpDescriptor(const MinidumpDescriptor& descriptor) MinidumpDescriptor::MinidumpDescriptor(const MinidumpDescriptor& descriptor)
: fd_(descriptor.fd_), : fd_(descriptor.fd_),
directory_(descriptor.directory_), directory_(descriptor.directory_),
c_path_(NULL) { c_path_(NULL),
size_limit_(descriptor.size_limit_) {
// The copy constructor is not allowed to be called on a MinidumpDescriptor // The copy constructor is not allowed to be called on a MinidumpDescriptor
// with a valid path_, as getting its c_path_ would require the heap which // with a valid path_, as getting its c_path_ would require the heap which
// can cause problems in compromised environments. // can cause problems in compromised environments.
@ -57,6 +58,7 @@ MinidumpDescriptor& MinidumpDescriptor::operator=(
c_path_ = NULL; c_path_ = NULL;
UpdatePath(); UpdatePath();
} }
size_limit_ = descriptor.size_limit_;
return *this; return *this;
} }

View File

@ -45,7 +45,7 @@ namespace google_breakpad {
class MinidumpDescriptor { class MinidumpDescriptor {
public: public:
MinidumpDescriptor() : fd_(-1) {} MinidumpDescriptor() : fd_(-1), size_limit_(-1) {}
explicit MinidumpDescriptor(const string& directory) explicit MinidumpDescriptor(const string& directory)
: fd_(-1), : fd_(-1),