Message ID | 87imo7nc7u.fsf@redhat.com |
---|---|
State | New |
Headers | show
Delivered-To: patches-gcc@linaro.org Received: by 2002:a2e:8081:0:0:0:0:0 with SMTP id i1csp3094850ljg; Tue, 29 Oct 2019 02:16:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqwuxqj6PkfQsxcN6JEk3jvLLIHjUTaVhkQPZtzw+d0TCDXPRssGA8H0rntDX1W7Xh9VXiTo X-Received: by 2002:aa7:dcd7:: with SMTP id w23mr24643135edu.34.1572340600492; Tue, 29 Oct 2019 02:16:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572340600; cv=none; d=google.com; s=arc-20160816; b=p4yTDz/V6F488ASiFLPrNZ30Lw4GlHG5CPMY2tOQHomgvJzXLdmfCl7YFaQCFTCZ+w ZYlex+5Z381QnmYBOiT48QSosgyYg0XI7/GYfv7uxDl6DkN+KYgIdCkAQiSUtxMy4bUQ Kuw8/bk0KSpcPS9t9/qYjO+0OHRpaH8C1PySDBj005uBIsf+/Z8ZI1eG/L12nWh20bQX fXDAC5rofBojWUudnIhB1+8GL5hWfCLoFvesR9AqY5BAgT/OufgLMjBxz9OHLa+BBCwf ypWCnN0h5xfpMH0Dsz3NnlFZWetSgBcD36qnsBaOIhpBTjS3H5Sk8FiRCOs0HyCGItVD 6EQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:dkim-signature:delivered-to:sender:list-help:list-post :list-archive:list-subscribe:list-unsubscribe:list-id:precedence :mailing-list:dkim-signature:domainkey-signature; bh=QkYMhnoMi3hibR0vBP1saRtG85vQ7efgEfClc4S/8iw=; b=rl4xKNzMw/IZ1ziMf/XgRuLxdLhJGAO+Vnk4oSc5lnQXSpz04PQf5x7u8v+KoqfqT+ RqDHPYRTxzkgoOmB/ABnqmeVHPm/kIpVnCWe0VZhoglxXBvpvvWOhAVngMH9hTlGDeMD R9nOhYInFu8sygdVpZrH7i1c5UiXwehTSQf0jKhurbDduNW8edbDYOTnqd78/QojutgV OMwMVsixBy5jt2jV+SFsogC3WxadTnb5lUQzCEKEIpL0E5/MDsvLwVkPQAQWPeq9rQnN FSv+Ow8zhcoHUckAMKMZ8lv3LKlNJuXVanr0wc1JYMTmKE/uEeKVkZ96pEjnCeogvDBY m05A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Da6uBoYZ; dkim=neutral (body hash did not verify) header.i=@redhat.com header.s=mimecast20190719 header.b=b7FSiypj; spf=pass (google.com: domain of binutils-return-107281-patches-gcc=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="binutils-return-107281-patches-gcc=linaro.org@sourceware.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: <binutils-return-107281-patches-gcc=linaro.org@sourceware.org> Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id t18si6738964ejf.351.2019.10.29.02.16.39 for <patches-gcc@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 29 Oct 2019 02:16:40 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-return-107281-patches-gcc=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=Da6uBoYZ; dkim=neutral (body hash did not verify) header.i=@redhat.com header.s=mimecast20190719 header.b=b7FSiypj; spf=pass (google.com: domain of binutils-return-107281-patches-gcc=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="binutils-return-107281-patches-gcc=linaro.org@sourceware.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=FpZ i+xkHtzBosd33+SSQjpIOy3xfKV0eLVpxv9ol4jdpfuLodLTKQsGf0FN5nCelbNq Yz9VvnzUGuAJ3SlpORzK0nbNVENIrIDG6toQy/D/E0Ubk5JuIiWQ1ocCa8CI9psA 6Dycs8HjkCG2Jhx4LpQvspEZ7gFID8ULJTfgj0hk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=RgDcc+0sB fmJgrv5ylXkF89IG/g=; b=Da6uBoYZo7H8JPxxTLWdtrCsCxMXAjMjV14uso5vh zJomYRJuiILNVZiArn2Kau25wxedmh8hTrBk+HwAI8/9d8GiP181nzw4yZT4itZt dweieOmzlZxPfUyEZ5D4pKEJ1aXry9G/ofOh5mK0xNWUCt4jdPGACKuQqdAl5iBr og= Received: (qmail 21247 invoked by alias); 29 Oct 2019 09:16:34 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <binutils.sourceware.org> List-Unsubscribe: <mailto:binutils-unsubscribe-patches-gcc=linaro.org@sourceware.org> List-Subscribe: <mailto:binutils-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/binutils/> List-Post: <mailto:binutils@sourceware.org> List-Help: <mailto:binutils-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: binutils-owner@sourceware.org Delivered-To: mailing list binutils@sourceware.org Received: (qmail 20483 invoked by uid 89); 29 Oct 2019 09:16:32 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=UD:info X-HELO: us-smtp-1.mimecast.com Received: from us-smtp-delivery-1.mimecast.com (HELO us-smtp-1.mimecast.com) (207.211.31.120) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 29 Oct 2019 09:16:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572340586; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9uu2Uy1cajjPPzNi4P8DV7/kzMjvHCLTdHPFOItjcEo=; b=b7FSiypjCSbHuiqyw87tHsYfW6Z7tXqxyeButa1gB9CBejCELptYWvwJSWpP50iJAzfRhm jsh1Sk+rd8NGTh716pMdD3UK4Lq2Vl0HnWvTkQjTqPhqSTFEwqX2mqVuU0YKd4RQROPUWk LcJSxhAcLUMQA0zF9RK1CSX7WYL5EmE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-Srj37NwOOpSmX67aaqgAhQ-1; Tue, 29 Oct 2019 05:16:25 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6E7CD5E6 for <binutils@sourceware.org>; Tue, 29 Oct 2019 09:16:24 +0000 (UTC) Received: from comet.redhat.com (ovpn-116-83.ams2.redhat.com [10.36.116.83]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E3CDF1001B09 for <binutils@sourceware.org>; Tue, 29 Oct 2019 09:16:23 +0000 (UTC) From: Nick Clifton <nickc@redhat.com> To: binutils@sourceware.org Subject: Commit: Fix impossible shift in CSKY disassembler Date: Tue, 29 Oct 2019 09:16:21 +0000 Message-ID: <87imo7nc7u.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes |
Series |
|
Related |
show
|
diff --git a/opcodes/csky-dis.c b/opcodes/csky-dis.c index efd1f75052..ffdb596495 100644 --- a/opcodes/csky-dis.c +++ b/opcodes/csky-dis.c @@ -134,10 +134,10 @@ csky_get_mask (struct csky_opcode_info const *pinfo) static unsigned int csky_chars_to_number (unsigned char * buf, int n) { - if (n == 0) + if (n <= 0) abort (); int i; - int val = 0; + unsigned int val = 0; if (dis_info.info->endian == BFD_ENDIAN_BIG) while (n--)