diff data/fileio/QuickTimeFileReader.cpp @ 699:3b00c1650490

Fix incorrect length calculation in creating CFURL from non-ASCII file path
author Chris Cannam
date Wed, 17 Aug 2011 22:12:13 +0100
parents 1424aa29ae95
children e802e550a1f2
line wrap: on
line diff
--- a/data/fileio/QuickTimeFileReader.cpp	Sun Jun 26 19:33:54 2011 +0100
+++ b/data/fileio/QuickTimeFileReader.cpp	Wed Aug 17 22:12:13 2011 +0100
@@ -89,10 +89,12 @@
  //       (0, m_path.toLocal8Bit().data(), 0);
 
 
+    QByteArray ba = m_path.toLocal8Bit();
+
     CFURLRef url = CFURLCreateFromFileSystemRepresentation
         (kCFAllocatorDefault,
-         (const UInt8 *)m_path.toLocal8Bit().data(),
-         (CFIndex)m_path.length(),
+         (const UInt8 *)ba.data(),
+         (CFIndex)ba.length(),
          false);