From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MyQNJ-0007h7-Tc for mharc-grub-devel@gnu.org; Thu, 15 Oct 2009 09:28:13 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyQNI-0007gI-4a for grub-devel@gnu.org; Thu, 15 Oct 2009 09:28:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyQNC-0007dU-TL for grub-devel@gnu.org; Thu, 15 Oct 2009 09:28:11 -0400 Received: from [199.232.76.173] (port=37018 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyQNC-0007dR-P1; Thu, 15 Oct 2009 09:28:06 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:9874) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyQNC-0001qu-9r; Thu, 15 Oct 2009 09:28:06 -0400 Received: by fg-out-1718.google.com with SMTP id 16so434493fgg.12 for ; Thu, 15 Oct 2009 06:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type; bh=rYaSiRoweT0ExiPdY+wmjOu1tlhD8S49dVLdqn6Leb4=; b=ldsazM4wEpbyGxx/emb4otmiYhUnTaXAvazIJJQI1I6IB1kpvneBQJUulg/+yMAq4R 3jP1XkDUyUhBdv+X1CNo6qGhr3aT1FDThmUy6Ri2fXO5JMHtrShqr5DFFWlK4SYPALDS 9MEtVKHVu7wnTlRy7wqg7O8iAeCubnTwHNj6k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; b=q15lU35BuR8kZXDc/L7IXnSTThpjFqWz8GuSy3bzIjvnfAoewAsl71STCgD1FJV6Tx uDz/ZvLtAJzjWVbBugSn8PZOk1zMxc4n0XJAXk6CDa3wZgGzVQ+6AxI28w1WBuR7w0ut 7ljDqDYW550Q1h5RT9xvEg1rMRQSOshpNxcI8= Received: by 10.86.22.12 with SMTP id 12mr158030fgv.69.1255613284947; Thu, 15 Oct 2009 06:28:04 -0700 (PDT) Received: from debian.bg45.phnet (hpx-public-dock-127-dhcp.ethz.ch [82.130.83.127]) by mx.google.com with ESMTPS id 3sm2163037fge.14.2009.10.15.06.28.02 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 15 Oct 2009 06:28:02 -0700 (PDT) Message-ID: <4AD72362.3030805@gmail.com> Date: Thu, 15 Oct 2009 15:28:02 +0200 From: Vladimir 'phcoder' Serbinenko User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: The development of GRUB 2 References: <20091013-211116.sv74720.58002@savannah.gnu.org> In-Reply-To: <20091013-211116.sv74720.58002@savannah.gnu.org> Content-Type: multipart/mixed; boundary="------------060800020501010906020607" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Cc: bug-grub@gnu.org, Andreas Born Subject: Re: [bug #27695] parser.sh ignores the closing quote when preceeded by a variable X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2009 13:28:12 -0000 This is a multi-part message in MIME format. --------------060800020501010906020607 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Andreas Born wrote: > URL: > > > Summary: parser.sh ignores the closing quote when preceeded > by a variable > Attached patch should fix this bug > Project: GNU GRUB > Submitted by: shador > Submitted on: Di 13 Okt 2009 21:11:16 GMT > Category: Terminal > Severity: Major > Priority: 5 - Normal > Item Group: Software Error > Status: None > Privacy: Public > Assigned to: None > Originator Name: > Originator Email: > Open/Closed: Open > Discussion Lock: Any > Release: > Release: SVN > Reproducibility: Every Time > Planned Release: None > > _______________________________________________________ > > Details: > > The problem is reproducible with this example: > >> set blub=blob >> echo $blub >> > blob > >> echo "${blub}" >> > blob > >> echo "$blub" >> >> > => fails, the closing quote is ignored > >> echo "$blub"" >> > blob > => works as workaround > > The real trouble starts with strings containing spaces. But it can be fixed, > as shown, by adding another quote at the end or using ${...}. > > This was tested with beta~4. > > > > > _______________________________________________________ > > Reply to this item at: > > > > _______________________________________________ > Nachricht geschickt von/durch Savannah > http://savannah.gnu.org/ > > > > _______________________________________________ > Bug-grub mailing list > Bug-grub@gnu.org > http://lists.gnu.org/mailman/listinfo/bug-grub > > -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git --------------060800020501010906020607 Content-Type: text/x-patch; name="varquote.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="varquote.diff" diff --git a/ChangeLog b/ChangeLog index b0864a9..db30e9f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-10-15 Vladimir Serbinenko + * script/sh/lexer.c (grub_script_yylex): Prevent character from changing + state twice. + +2009-10-15 Vladimir Serbinenko + * loader/i386/pc/xnu.c (grub_xnu_set_video): Fix loading splash image. 2009-10-15 Vladimir Serbinenko diff --git a/script/sh/lexer.c b/script/sh/lexer.c index a30e3c0..0c71dae 100644 --- a/script/sh/lexer.c +++ b/script/sh/lexer.c @@ -350,9 +350,11 @@ grub_script_yylex (union YYSTYPE *yylval, struct grub_parser_param *parsestate) if (! (check_varstate (newstate))) { if (state->state == GRUB_PARSER_STATE_VARNAME2 - || state->state == GRUB_PARSER_STATE_QVARNAME2) - nextchar (state); - state->state = newstate; + || state->state == GRUB_PARSER_STATE_QVARNAME2) + { + nextchar (state); + state->state = newstate; + } break; } @@ -378,7 +380,6 @@ grub_script_yylex (union YYSTYPE *yylval, struct grub_parser_param *parsestate) buffer[bufpos++] = 0; - state->state = newstate; yylval->arg = grub_script_arg_add (parsestate, yylval->arg, GRUB_SCRIPT_ARG_TYPE_VAR, buffer); grub_dprintf ("scripting", "vartoken=`%s'\n", buffer); --------------060800020501010906020607--