From 30bb8ca2fd234b5e437bc4135b6b0df47fd7b197 Mon Sep 17 00:00:00 2001 From: konstin Date: Sun, 7 Sep 2014 15:57:53 +0200 Subject: [PATCH] fixing crash when running with asan --- src/io/file_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/file_manager.cpp b/src/io/file_manager.cpp index 71e9ab6ee..f429c44c9 100644 --- a/src/io/file_manager.cpp +++ b/src/io/file_manager.cpp @@ -422,7 +422,7 @@ XMLNode *FileManager::createXMLTreeFromString(const std::string & content) { char *b = new char[content.size()]; memcpy(b, content.c_str(), content.size()); - io::IReadFile * ireadfile = m_file_system->createMemoryReadFile(b, strlen(b), "tempfile", true); + io::IReadFile * ireadfile = m_file_system->createMemoryReadFile(b, content.size(), "tempfile", true); io::IXMLReader * reader = m_file_system->createXMLReader(ireadfile); XMLNode* node = new XMLNode(reader); reader->drop(); @@ -791,7 +791,7 @@ void FileManager::checkAndCreateConfigDir() { m_user_config_dir = getenv("HOME"); checkAndCreateDirectory(m_user_config_dir); - + m_user_config_dir += "/.config"; if(!checkAndCreateDirectory(m_user_config_dir)) {