about summary refs log tree commit diff
path: root/src/libexpr/value.hh
diff options
context:
space:
mode:
authorStuart Pernsteiner <stuart@pernsteiner.org>2012-12-13T05·13-0800
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-12-13T10·13+0100
commita9045c727fab1cdcc530bc18e651334cf892d62c (patch)
tree282bf85b252731272f3da562aeb209dbfb12eccd /src/libexpr/value.hh
parent9fa12fc2015c9cbc34bcf9d83e7396ba5dbc81a9 (diff)
fix use-after-free bug in mkString(Value&, Symbol&)
Diffstat (limited to 'src/libexpr/value.hh')
-rw-r--r--src/libexpr/value.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh
index c9ec236c470d..91b4f78fa65c 100644
--- a/src/libexpr/value.hh
+++ b/src/libexpr/value.hh
@@ -131,7 +131,7 @@ static inline void mkStringNoCopy(Value & v, const char * s)
 
 static inline void mkString(Value & v, const Symbol & s)
 {
-    mkStringNoCopy(v, ((string) s).c_str());
+    mkStringNoCopy(v, ((const string &) s).c_str());
 }