summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2019-10-17 06:53:44 +0000
committerThomas Holder <thomas@thomas-holder.de>2019-10-17 06:53:44 +0000
commitb619396309c912ce3ce817b9775982200f4e38a7 (patch)
treeda1862799cbb58143dcbb65cba2d123382ef3263 /src
parentFix logic for Tool Combobox's group label (diff)
downloadinkscape-b619396309c912ce3ce817b9775982200f4e38a7.tar.gz
inkscape-b619396309c912ce3ce817b9775982200f4e38a7.zip
fix heap-use-after-free
Verb::set_tip takes a borrowed string pointer. This line in Effect::check() is invalid if getErrorReason() returns a temporary: _verb.set_tip(Extension::getErrorReason().c_str());
Diffstat (limited to 'src')
-rw-r--r--src/extension/extension.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/extension/extension.h b/src/extension/extension.h
index 4a857947e..2ddd8f3f4 100644
--- a/src/extension/extension.h
+++ b/src/extension/extension.h
@@ -143,7 +143,7 @@ public:
void deactivate ();
bool deactivated ();
void printFailure (Glib::ustring reason);
- std::string getErrorReason() { return _error_reason; };
+ std::string const &getErrorReason() { return _error_reason; };
Implementation::Implementation * get_imp () { return imp; };
void set_execution_env (ExecutionEnv * env) { execution_env = env; };
ExecutionEnv *get_execution_env () { return execution_env; };