Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 903CEC76196 for ; Tue, 28 Mar 2023 16:44:00 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7899985C2B; Tue, 28 Mar 2023 18:43:57 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=gmx.de header.i=xypron.glpk@gmx.de header.b="UTni05pR"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 8CC0E85C2B; Tue, 28 Mar 2023 18:43:55 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1544585BC7 for ; Tue, 28 Mar 2023 18:43:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1680021831; i=xypron.glpk@gmx.de; bh=BSo2IVUgftk3l8lcbfTnmgLbfOoC603V5XvhJMJgL/s=; h=X-UI-Sender-Class:Date:Subject:To:Cc:References:From:In-Reply-To; b=UTni05pRWMPRPIcJgokOdVqZjJUdYaNNo1hODuQj+n7XmnwMNltlI9KpsMLWYQpTs 4i+MsJWz9gIWg0ASWlnVkX1RcjmergRaGnNmHtDeRl8nGb4w8B4MURzSYqhyQ6Jx+5 4TC5s1mg6ka5OMfoac+363K+76AD0ionkispt3Vzwo1OTJ8ohEuTeLCpZOrS4NIVf1 J0aQkoTtKf54klWuFHYSFZGxcx3/vscDfh/uxQOgYYMW+jMvAB/y6vtX+p4xY2noLk ctC5IXNCc81b6i5kgszv2fdX1UBy6FXfl14jYFrkG0pNElBlgyb7hPjcEWVpHlqrXw hmUGhZs1QwCJA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [192.168.123.94] ([88.152.145.137]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MCKBc-1pXt250Vdq-009MDx; Tue, 28 Mar 2023 18:43:51 +0200 Message-ID: <61de682b-30c8-f84a-8f79-d76ed0a93046@gmx.de> Date: Tue, 28 Mar 2023 18:43:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [RESEND PATCH v3 2/2] cli: Correct handling of invalid escape sequences in cread_line() Content-Language: en-US To: Simon Glass Cc: =?UTF-8?Q?Pali_Roh=c3=a1r?= , Sean Anderson , Stefan Roese , U-Boot Mailing List References: <20230327193414.1803604-1-sjg@chromium.org> <20230328083409.RESEND.v3.2.I4dc20209fd533bab1cf3fcefa4d27df085aa1615@changeid> From: Heinrich Schuchardt In-Reply-To: <20230328083409.RESEND.v3.2.I4dc20209fd533bab1cf3fcefa4d27df085aa1615@changeid> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:ajuxxBpI8DhsZ6GZ7HVvV6wjY5bv8xvC1r9LaZ0wAm69buYUJwj qM78NsqxdUXrtL29vNILx6miXMN8kJq7H5THq38w5lRE0kmSZyqm5Hj2sI1mSRxyB0bJTkq RThs6ryb+GcvpTcOz7m1bYfoSq00xaaB7Ejdzf+wI/exoy6ESSBLgM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-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On 3/27/23 21:34, Simon Glass wrote: > The second call to cli_ch_process() is in the wrong place, meaning that > the one of the characters of an invalid escape sequence is swallowed > instead of being returned. > > Fix the bug and add a test to cover this. > > This behaviour matches that of the code before cli_getch() was > introduced. This was verified on the commit before b08e9d4b66 i.e.: > > 7d850f85aad ("sandbox: Enable mmc command and legacy images") > > Signed-off-by: Simon Glass > Reported-by: Heinrich Schuchardt > --- Thanks for the fix. Some strange behavior still remains like giving '6S' on the command line. But at least no error code. Best regards Heinrich