summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/utils.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-04-05 09:42:23 +0000
committerRobert Pösel <robyer@seznam.cz>2014-04-05 09:42:23 +0000
commite1ffadefb3bb47c1201091572c746ffd2396630f (patch)
treebaa6d7dc227466f50375419cf54b35f824498207 /protocols/FacebookRM/src/utils.cpp
parent5e8e5ed54e602e0de3d328098ff828cba441b2a0 (diff)
Facebook: fix possible crash in slashu_to_utf8()
git-svn-id: http://svn.miranda-ng.org/main/trunk@8859 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/utils.cpp')
-rw-r--r--protocols/FacebookRM/src/utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/utils.cpp b/protocols/FacebookRM/src/utils.cpp
index 5cafafc3e8..36d72a865f 100644
--- a/protocols/FacebookRM/src/utils.cpp
+++ b/protocols/FacebookRM/src/utils.cpp
@@ -302,7 +302,7 @@ std::string utils::text::remove_html(std::string data)
for (std::string::size_type i = 0; i < data.length(); i++)
{
- if (data.at(i) == '<' && data.at(i+1) != ' ')
+ if (data.at(i) == '<' && (i+1) < data.length() && data.at(i+1) != ' ')
{
i = data.find(">", i);
if (i == std::string::npos)