fix of the fix

This commit is contained in:
Niels committed 2015-02-15 17:40:46 +01:00
1 parent 9f87fd464a
commit d31d1ca664
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -3423,7 +3423,7 @@ basic_json_parser_59:
if (codepoint >= 0xD800 and codepoint <= 0xDBFF) if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
{ {
// make sure there is a subsequent unicode // make sure there is a subsequent unicode
if (m_cursor - i < 11 and * (i + 5) == '\\' and * (i + 6) == 'u') if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
{ {
throw std::invalid_argument("missing low surrogate"); throw std::invalid_argument("missing low surrogate");
} }
+1 -1
View File
@@ -2772,7 +2772,7 @@ class basic_json
if (codepoint >= 0xD800 and codepoint <= 0xDBFF) if (codepoint >= 0xD800 and codepoint <= 0xDBFF)
{ {
// make sure there is a subsequent unicode // make sure there is a subsequent unicode
if (m_cursor - i < 11 and * (i + 5) == '\\' and * (i + 6) == 'u') if ((i + 6 >= m_limit) or * (i + 5) != '\\' or * (i + 6) != 'u')
{ {
throw std::invalid_argument("missing low surrogate"); throw std::invalid_argument("missing low surrogate");
} }