lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 26 Apr 2019 09:58:22 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     Joerg Roedel <joro@...tes.org>
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iommu/dmar: Use struct_size() helper



On 4/26/19 9:44 AM, Joerg Roedel wrote:
> On Thu, Apr 18, 2019 at 01:46:24PM -0500, Gustavo A. R. Silva wrote:
>> Make use of the struct_size() helper instead of an open-coded version
>> in order to avoid any potential type mistakes, in particular in the
>> context in which this code is being used.
>>
>> So, replace code of the following form:
>>
>> size = sizeof(*info) + level * sizeof(info->path[0]);
>>
>> with:
>>
>> size = struct_size(info, path, level);
>>
>> Signed-off-by: Gustavo A. R. Silva <gustavo@...eddedor.com>
> 
> Applied, thanks.
> 

Great. :)

Thanks, Joerg.
--
Gustavo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ