From a9045c727fab1cdcc530bc18e651334cf892d62c Mon Sep 17 00:00:00 2001 From: Stuart Pernsteiner Date: Wed, 12 Dec 2012 21:13:26 -0800 Subject: [PATCH] fix use-after-free bug in mkString(Value&, Symbol&) --- src/libexpr/value.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr/value.hh b/src/libexpr/value.hh index c9ec236c4..91b4f78fa 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()); }