Commit | Line | Data |
---|---|---|
667e777b LF |
1 | Fix CVE-2016-9136: |
2 | ||
3 | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9136 | |
4 | http://bugs.ghostscript.com/show_bug.cgi?id=697244 | |
5 | ||
6 | Patch copied from upstream source repository: | |
7 | http://git.ghostscript.com/?p=mujs.git;a=commitdiff;h=a0ceaf5050faf419401fe1b83acfa950ec8a8a89 | |
8 | From a0ceaf5050faf419401fe1b83acfa950ec8a8a89 Mon Sep 17 00:00:00 2001 | |
9 | From: Tor Andersson <tor.andersson@artifex.com> | |
10 | Date: Mon, 31 Oct 2016 13:05:37 +0100 | |
11 | Subject: [PATCH] Fix 697244: Check for incomplete escape sequence at end of | |
12 | input. | |
13 | ||
14 | --- | |
15 | jslex.c | 1 + | |
16 | 1 file changed, 1 insertion(+) | |
17 | ||
18 | diff --git a/jslex.c b/jslex.c | |
19 | index cbd0eeb..aaafdac 100644 | |
20 | --- a/thirdparty/mujs/jslex.c | |
21 | +++ b/thirdparty/mujs/jslex.c | |
22 | @@ -377,6 +377,7 @@ static int lexescape(js_State *J) | |
23 | return 0; | |
24 | ||
25 | switch (J->lexchar) { | |
26 | + case 0: jsY_error(J, "unterminated escape sequence"); | |
27 | case 'u': | |
28 | jsY_next(J); | |
29 | if (!jsY_ishex(J->lexchar)) return 1; else { x |= jsY_tohex(J->lexchar) << 12; jsY_next(J); } | |
30 | -- | |
31 | 2.10.2 | |
32 |