]> granicus.if.org Git - transmission/commitdiff
(2.7x qt) backport r13686 for #5192
authorJordan Lee <jordan@transmissionbt.com>
Sat, 5 Jan 2013 22:53:52 +0000 (22:53 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sat, 5 Jan 2013 22:53:52 +0000 (22:53 +0000)
NEWS
qt/prefs.cc

diff --git a/NEWS b/NEWS
index 4b75b3af3b8f24f89d118df2e7541f71ddbf0d51..fd31f33c1e9564b516ef7948f598ac48ce1ee6d4 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -17,6 +17,7 @@
   * Fix display of the torrent name in the Torrent Options dialog
   * Fix cursor point bug in the filterbar's entry field
   * Fix crash when adding a magnet link while Transmission was only visible in the system tray
+  * Fix free-memory-read error on shutdown
 ==== Daemon ====
   * Better watchdir support
   * Documentation fixes in transmission-remote's manpage
index cf2cc25faefd78723f8e4ae19ced32746c24b504..7e0609b30fd9d5c658cbb169fdbc157971035801 100644 (file)
@@ -220,7 +220,9 @@ Prefs :: ~Prefs( )
                 tr_bencDictAddStr( &top, key, val.value<FilterMode>().name().toUtf8().constData() );
                 break;
             case QVariant::String:
-                {   const char * s = val.toByteArray().constData();
+                {
+                    const QByteArray ba (val.toByteArray()); 
+                    const char * s = ba.constData();
                     if ( Utils::isValidUtf8( s ) )
                         tr_bencDictAddStr( &top, key, s );
                     else