|
From: | Manos Pitsidianakis |
Subject: | Re: [PULL v2 17/61] virtio-snd: check for invalid param shift operands |
Date: | Fri, 02 Aug 2024 14:13:14 +0300 |
User-agent: | meli 0.8.7 |
On Fri, 02 Aug 2024 08:03, Volker Rümelin <vr_qemu@t-online.de> wrote:
Am 01.08.24 um 10:22 schrieb Michael S. Tsirkin:On Sat, Jul 27, 2024 at 08:55:10AM +0200, Volker Rümelin wrote: >>>>Hi Manos, this patch doesn't work as intended. I guess you wanted to write if (params->format >= sizeof(supported_formats) * BITS_PER_BYTE || !(supported_formats & BIT(params->format))) {+ if (BIT(params->format) > sizeof(supported_formats) || + !(supported_formats & BIT(params->format))) { error_report("Stream format is not supported."); return cpu_to_le32(VIRTIO_SND_S_NOT_SUPP); } - if (!(supported_rates & BIT(params->rate))) {if (params->rate >= sizeof(supported_rates) * BITS_PER_BYTE || !(supported_rates & BIT(params->rate))) { With best regards, VolkerAny response here? Should I revert?No response so far. It's not necessary to revert. I'll send a patch. With best regards, Volker
Hello, I am on PTO. I reviewed Volker's patch, and it LGTM. Thank you both, Manos
[Prev in Thread] | Current Thread | [Next in Thread] |