qapi: Fix crash on stray double quote character
commit5b5fe0e018891dc08bcce75f064015c42aeb46a4
authorMarkus Armbruster <armbru@redhat.com>
Fri, 28 Apr 2023 10:54:15 +0000 (28 12:54 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Tue, 9 May 2023 06:51:58 +0000 (9 08:51 +0200)
treebfd0741cdc1713fbe9d2d929bd77bf3ceec44f1e
parenta2836b32b02a1d774f8c2504cb368c05d74ad492
qapi: Fix crash on stray double quote character

When the lexer chokes on a stray character, its shows the characters
until the next structural character in the error message.  It uses a
regular expression to match a non-empty string of non-structural
characters.  Bug: the regular expression treats '"' as structural.
When the lexer chokes on '"', the match fails, and trips
must_match()'s assertion.  Fix the regular expression.

Fixes: 14c32795024c (qapi: Improve reporting of lexical errors)
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20230428105429.1687850-4-armbru@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
scripts/qapi/parser.py