summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-25 22:31:50 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-25 23:31:02 +0300
commit7ee1d89a656c05b62fa3104b59504afed0037b69 (patch)
tree7a20e371ba1035fc43135f069407b51d81d15527 /src/utils/stringutils.cpp
parentd49a520d19f28c613c68b574686b182a9c0621be (diff)
downloadmv-7ee1d89a656c05b62fa3104b59504afed0037b69.tar.gz
mv-7ee1d89a656c05b62fa3104b59504afed0037b69.tar.bz2
mv-7ee1d89a656c05b62fa3104b59504afed0037b69.tar.xz
mv-7ee1d89a656c05b62fa3104b59504afed0037b69.zip
Add missing checks into db directory.
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index b6251a378..3e067fe5c 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -294,6 +294,8 @@ const char* getSafeUtf8String(const std::string &text)
void getSafeUtf8String(std::string text, char *const buf)
{
+ if (!buf)
+ return;
const size_t sz = text.size();
const size_t size = sz + UTF8_MAX_SIZE;
if (size > 65500)