public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Colin King <colin.king@canonical.com>
Cc: Olivia Mackintosh <livvy@base.nu>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	alsa-devel@alsa-project.org, kernel-janitors@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Fix unintentional sign extension issue
Date: Thu, 18 Mar 2021 14:25:45 +0100	[thread overview]
Message-ID: <s5h1rcciofa.wl-tiwai@suse.de> (raw)
In-Reply-To: <20210318132008.15266-1-colin.king@canonical.com>

On Thu, 18 Mar 2021 14:20:08 +0100,
Colin King wrote:
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> The shifting of the u8 integer device by 24 bits to the left will
> be promoted to a 32 bit signed int and then sign-extended to a
> 64 bit unsigned long. In the event that the top bit of device is
> set then all then all the upper 32 bits of the unsigned long will
> end up as also being set because of the sign-extension. Fix this
> by casting device to an unsigned long before the shift.
> 
> Addresses-Coverity: ("Unintended sign extension")
> Fixes: a07df82c7990 ("ALSA: usb-audio: Add DJM750 to Pioneer mixer quirk")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Thanks, applied now.


Takashi

      reply	other threads:[~2021-03-18 13:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-18 13:20 [PATCH] ALSA: usb-audio: Fix unintentional sign extension issue Colin King
2021-03-18 13:25 ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5h1rcciofa.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=colin.king@canonical.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=livvy@base.nu \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox