Message ID | 1400901095-29391-3-git-send-email-sjg@chromium.org |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 1B539140086 for <incoming@patchwork.ozlabs.org>; Sat, 24 May 2014 13:18:10 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 77B254B656; Sat, 24 May 2014 05:18:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id by-+l9BGTTXq; Sat, 24 May 2014 05:18:08 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 87E8E4B65A; Sat, 24 May 2014 05:18:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 529E44B65A for <u-boot@lists.denx.de>; Sat, 24 May 2014 05:18:02 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9Cr8c7HbQDQP for <u-boot@lists.denx.de>; Sat, 24 May 2014 05:17:59 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-vc0-f202.google.com (mail-vc0-f202.google.com [209.85.220.202]) by theia.denx.de (Postfix) with ESMTPS id 1FD164B656 for <u-boot@lists.denx.de>; Sat, 24 May 2014 05:17:54 +0200 (CEST) Received: by mail-vc0-f202.google.com with SMTP id hq11so197579vcb.3 for <u-boot@lists.denx.de>; Fri, 23 May 2014 20:17:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xiUu5s5gJvIJaohqjD534Uxp51uRXHmbFcjj4zX/tzE=; b=Gm+zrn95xIWK2kiAQDpbS+Awjd5vVLm8iV6Un4H3GVOcdxNHIMb+n7JEk6MX9R8r8h gdO3xOZO7aKoF5pml3W2URW8cA2dEZbPGLRv4bDKoeEcKKhT2G54D6Etub2zGlrHlkyG fz+KOFB4iAxeYmIDOkeCBnqnmMRZH9Ie/MOGhnRlMB5X9slQrh7a+gBScUldQ8d2F2ES qT4I0qOiIU5C1qqtd5S6VK2Krs7jy0XjmLuUF9eGaGn4LiZ/JdW9JTseJibQ1xLYGTk6 9VXcMCEJ72/wgcDGdhLAdy+qEz0ZYTp5XnI142u1EOm44ySj3MOqTB83axan21syY5rr vvtQ== X-Gm-Message-State: ALoCoQnT+NCyc/x+D5SKJYi4TjuE4NnZay8bi5fxQElXh6QrPUeN5fVg/b912CzYTQnYw8h+Isnf X-Received: by 10.236.31.40 with SMTP id l28mr3604079yha.34.1400901117494; Fri, 23 May 2014 20:11:57 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id i65si26586yhg.2.2014.05.23.20.11.57 for <multiple recipients> (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 23 May 2014 20:11:57 -0700 (PDT) Received: from kaki.bld.corp.google.com (kaki.bld.corp.google.com [172.29.216.32]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 60DC431CD82; Fri, 23 May 2014 20:11:57 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 090A2220752; Fri, 23 May 2014 21:11:56 -0600 (MDT) From: Simon Glass <sjg@chromium.org> To: U-Boot Mailing List <u-boot@lists.denx.de> Date: Fri, 23 May 2014 21:11:33 -0600 Message-Id: <1400901095-29391-3-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.9.1.423.g4596e3a In-Reply-To: <1400901095-29391-1-git-send-email-sjg@chromium.org> References: <1400901095-29391-1-git-send-email-sjg@chromium.org> Cc: Tom Rini <trini@ti.com> Subject: [U-Boot] [PATCH 2/4] Fix itest mask overflow X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <http://lists.denx.de/mailman/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <http://lists.denx.de/mailman/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de |
diff --git a/common/cmd_itest.c b/common/cmd_itest.c index ae2527b..76af62b 100644 --- a/common/cmd_itest.c +++ b/common/cmd_itest.c @@ -63,7 +63,7 @@ static long evalexp(char *s, int w) l = simple_strtoul(s, NULL, 16); } - return (l & ((1 << (w * 8)) - 1)); + return l & ((1UL << (w * 8)) - 1); } static char * evalstr(char *s)
The mask value used in itest overflows and therefore it can return an incorrect result for something like 'itest 0 == 1'. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> --- common/cmd_itest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)