Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp9694154imu; Wed, 5 Dec 2018 08:48:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/U1/DHyf65dHIKpyDyxL5FN9nSOVGwHQF0ayWguY7sBU8kkGXd7/CQcNDsDHxvW+D4vjlSl X-Received: by 2002:a17:902:31a4:: with SMTP id x33mr24442023plb.41.1544028525291; Wed, 05 Dec 2018 08:48:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544028525; cv=none; d=google.com; s=arc-20160816; b=JcKGxeH7wng5xQZtLqV0IDJWN14ig27RvLjNMRs7Pgd+g9jFcGg209Nmx57MQJTfD7 1k1iUst2ZGzOnw6JSAZ0mzFrpKM+wrjWHdXsXwzyZmNJJDAl0ZCL6/Akg4uZUj+naWKd n0ila+A3QlPXlD1Pu9xGJ1ItNulbHrXAWvyUfxPe747xkDy9LIt5IRNbyttHv4P3FzQB zhYn7BClEhHYdX+KvYze657m8JPaFPNl3RYAsioomwXBK8Lh5MrMgaBfVr6yyIi9GJ7/ Tw1h0dNEVbevlDqCUa3cPphaX91WKExhw3zisMJZw9CmOFxV5LyB60/ZxL3AUlZotd4f DXBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=q7xFKutB7G6oXRPDuD0iaVaxgXXZ1TUJLZ08Ntx5z50=; b=0/D8Ks3ENykZlBXYo38RLUoWE6j1gFmYf1MfiqrDeTEZiBvDdPQvfx1nkBo988DNj1 QCEPlL+w6HRxqZwq6EmoRQhXXJq7piai9Zytof7XxVcj8dHZeDJ5RLTAepFryKMD51J+ 7enYM3PM2m8aP+dq2W5ECHtMJanZeoxq3rl6lLR66p45bCYDmkIFORV62pPdOcn3QEWJ pGxHwl4N2MYlPWi2o2ODc68+cVliAi8DILshjtvt0J4sgvpj008eBDmTvfSwLgAWpL/t Y3t4d+egtIBiCxig4R64t5FQT309ZZ6DNTuIwTnBI+SEaYZq8KMhXZZS+o6VSjVwMFL/ twuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JrYn9iiC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o9si20564244pfe.63.2018.12.05.08.48.29; Wed, 05 Dec 2018 08:48:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=JrYn9iiC; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727564AbeLEQrp (ORCPT + 99 others); Wed, 5 Dec 2018 11:47:45 -0500 Received: from mail-lj1-f194.google.com ([209.85.208.194]:37403 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727242AbeLEQrp (ORCPT ); Wed, 5 Dec 2018 11:47:45 -0500 Received: by mail-lj1-f194.google.com with SMTP id e5-v6so18980752lja.4 for ; Wed, 05 Dec 2018 08:47:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q7xFKutB7G6oXRPDuD0iaVaxgXXZ1TUJLZ08Ntx5z50=; b=JrYn9iiCgaedA41Zv1Jg8OMExvG8qLX3PQh8I8KIEoIgL1YFNW8cTB4mMSTrRcl1qk 8lrOuhNosJO5z8G2bhdeDw60jwLqclQhudN6iIOEYbSnymYJuYGSuVfkSX4fskkIaEWF 7rfJvtrNSwaEwu5Xysh7OTVNBe6BvBbtkwjryEOqk48BCw9Y2eggFvsJw/EG96MdFlzP VtQTJ+jMt/SxgqdtFLIWKvfcUGAJnQYElfKEONxuyOFXPVk2BP+rnZxUPUqOKpt9uHdw 0tDSeU7JG9kLW37FTWYyq1rVo0PKK7Hun/vBVZsSvLiZvXgTyrM1G5QHVo+pjQyO5L2C 6vbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q7xFKutB7G6oXRPDuD0iaVaxgXXZ1TUJLZ08Ntx5z50=; b=o0Boy6DHu+ZH7RqQWaG2eCIFKxd54p6rC4hIOPhnd2wskCY6AOVms9LAOk6h/uh3xU gLy2M+jUXSyiQhoYPV3GTvZty7zUD7PhHETV4fbcTFFgh7g9oIsq7+Nse65vl5fAfsD4 YzI1T7F1qOaKxnDjyBfoOMLxC5wuoJGxm9TV2i1cWsRSKnm7ZsWs20uOgKUM+0pZ734e TNA/QFGit0v7/QzyQ2oVJa0ngc8ogLV6L6MeUfn4Y3LqKC2p2cjGYMhbOEmnc+SVWFEl XLvkDLMt7MxJDiNSL9fp6kVw1M0xxzT03gsFDaWy7dh45YJvAdZW3GXdFucWtPEfk2NV LK2g== X-Gm-Message-State: AA+aEWahlaslVwgvzq2FnWabLsnkjKiZIgpnw0+FtbdraSoUGvPNFkSk 6+y8F4BUGBZA8Qem0wJMNWkXPmEivMYQMbtUHhA= X-Received: by 2002:a2e:58b:: with SMTP id 133-v6mr17287046ljf.127.1544028462926; Wed, 05 Dec 2018 08:47:42 -0800 (PST) MIME-Version: 1.0 References: <20181205135247.7964-1-mans@mansr.com> In-Reply-To: <20181205135247.7964-1-mans@mansr.com> From: Miguel Ojeda Date: Wed, 5 Dec 2018 17:47:31 +0100 Message-ID: Subject: Re: [PATCH] auxdisplay: charlcd: fix x/y command parsing To: mans@mansr.com Cc: linux-kernel , Robert Abel , Geert Uytterhoeven , Willy Tarreau , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mans, [CC'ing a few people involved previously on this] On Wed, Dec 5, 2018 at 2:53 PM Mans Rullgard wrote: > > Commit b34050fadb86 ("auxdisplay: charlcd: Fix and clean up handling of > x/y commands") fixed some problems by rewriting the parsing code, > but also broke things further by removing the check for a complete > command before attempting to parse it. As a result, parsing is > terminated at the first x or y character. Why is it necessary to check for ";" to be exactly at the end? Or, in other words, what requires it? If the syntax supported by parse_xy() is wrong for some reason, we should fix that (instead of adding a check before calling it). Thanks for taking a look at this! Cheers, Miguel