aboutsummaryrefslogtreecommitdiffhomepage
path: root/common.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-07 12:54:43 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-12-07 12:54:43 -0800
commita23441109deebe703a436968294966abbca64cb6 (patch)
tree4fa7ab76ff07f204c0df54377c49d8b435a77f20 /common.cpp
parentf2211ff3ad826896a0903bdfa3f2ffea93049caf (diff)
parent2efc0bad1c414d5e74b9a43148daf8cba202a02b (diff)
Merge branch 'master' into ast
Conflicts: complete.cpp fish_tests.cpp highlight.cpp
Diffstat (limited to 'common.cpp')
-rw-r--r--common.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/common.cpp b/common.cpp
index 04c176ae..259fdffa 100644
--- a/common.cpp
+++ b/common.cpp
@@ -1198,6 +1198,11 @@ static size_t read_unquoted_escape(const wchar_t *input, wcstring *result, bool
{
chars=8;
max_val = WCHAR_MAX;
+
+ // Don't exceed the largest Unicode code point - see #1107
+ if (0x10FFFF < max_val)
+ max_val = (wchar_t)0x10FFFF;
+
break;
}
@@ -1594,6 +1599,7 @@ static bool unescape_string_internal(const wchar_t * const input, const size_t i
{
/* Swallow newline */
to_append = NOT_A_WCHAR;
+ input_position += 1; /* Skip over the backslash */
break;
}