From 7ee1d89a656c05b62fa3104b59504afed0037b69 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 25 Jun 2015 22:31:50 +0300 Subject: Add missing checks into db directory. --- src/utils/stringutils.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/utils/stringutils.cpp') 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) -- cgit v1.2.3-70-g09d2