shithub: libmujs

Download patch

ref: a0ceaf5050faf419401fe1b83acfa950ec8a8a89
parent: b6de34ac6d8bb7dd5461c57940acfbd3ee7fd93e
author: Tor Andersson <tor.andersson@artifex.com>
date: Mon Oct 31 09:05:37 EDT 2016

Fix 697244: Check for incomplete escape sequence at end of input.

--- a/jslex.c
+++ b/jslex.c
@@ -377,6 +377,7 @@
 		return 0;
 
 	switch (J->lexchar) {
+	case 0: jsY_error(J, "unterminated escape sequence");
 	case 'u':
 		jsY_next(J);
 		if (!jsY_ishex(J->lexchar)) return 1; else { x |= jsY_tohex(J->lexchar) << 12; jsY_next(J); }