[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5h1rcciofa.wl-tiwai@suse.de>
Date: Thu, 18 Mar 2021 14:25:45 +0100
From: Takashi Iwai <tiwai@...e.de>
To: Colin King <colin.king@...onical.com>
Cc: Olivia Mackintosh <livvy@...e.nu>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
kernel-janitors@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ALSA: usb-audio: Fix unintentional sign extension issue
On Thu, 18 Mar 2021 14:20:08 +0100,
Colin King wrote:
>
> From: Colin Ian King <colin.king@...onical.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@...onical.com>
Thanks, applied now.
Takashi
Powered by blists - more mailing lists