From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=49248 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ONAN0-0004cS-OF for qemu-devel@nongnu.org; Fri, 11 Jun 2010 15:58:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1ONAMy-0004OD-6g for qemu-devel@nongnu.org; Fri, 11 Jun 2010 15:58:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57586) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1ONAMx-0004Nm-Tw for qemu-devel@nongnu.org; Fri, 11 Jun 2010 15:58:24 -0400 From: Luiz Capitulino Date: Fri, 11 Jun 2010 16:58:07 -0300 Message-Id: <1276286295-17601-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1276286295-17601-1-git-send-email-lcapitulino@redhat.com> References: <1276286295-17601-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 02/10] json-lexer: Handle missing escapes List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: qemu-devel@nongnu.org The JSON escape sequence "\/" and "\\" are valid and should be handled. Signed-off-by: Luiz Capitulino --- json-lexer.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/json-lexer.c b/json-lexer.c index 0b145d1..5cc7e6c 100644 --- a/json-lexer.c +++ b/json-lexer.c @@ -97,6 +97,8 @@ static const uint8_t json_lexer[][256] = { ['n'] = IN_DQ_STRING, ['r'] = IN_DQ_STRING, ['t'] = IN_DQ_STRING, + ['/'] = IN_DQ_STRING, + ['\\'] = IN_DQ_STRING, ['\''] = IN_DQ_STRING, ['\"'] = IN_DQ_STRING, ['u'] = IN_DQ_UCODE0, @@ -134,6 +136,8 @@ static const uint8_t json_lexer[][256] = { ['n'] = IN_SQ_STRING, ['r'] = IN_SQ_STRING, ['t'] = IN_SQ_STRING, + ['/'] = IN_DQ_STRING, + ['\\'] = IN_DQ_STRING, ['\''] = IN_SQ_STRING, ['\"'] = IN_SQ_STRING, ['u'] = IN_SQ_UCODE0, -- 1.7.1.251.g92a7