From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53817 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEr9p-0008Rp-Bh for qemu-devel@nongnu.org; Wed, 19 May 2010 17:50:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEr4Q-0001aa-4N for qemu-devel@nongnu.org; Wed, 19 May 2010 17:44:55 -0400 Received: from mail-pv0-f173.google.com ([74.125.83.173]:47048) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEr4P-0001aH-VL for qemu-devel@nongnu.org; Wed, 19 May 2010 17:44:54 -0400 Received: by pvg6 with SMTP id 6so1463244pvg.4 for ; Wed, 19 May 2010 14:44:52 -0700 (PDT) Message-ID: <4BF45BCF.5090300@codemonkey.ws> Date: Wed, 19 May 2010 16:44:47 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/6] json-lexer: Handle missing escapes References: <1274303733-3700-1-git-send-email-lcapitulino@redhat.com> <1274303733-3700-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1274303733-3700-3-git-send-email-lcapitulino@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On 05/19/2010 04:15 PM, Luiz Capitulino wrote: > The JSON escape sequence "\/" and "\\" are valid and should be > handled. > > Signed-off-by: Luiz Capitulino > Good catch. > --- > 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, >