lkml.org 
[lkml]   [2013]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] efi: Distinguish between "remaining space" and actually used space
On 04/10/2013 10:41 AM, Matthew Garrett wrote:
> + if (!storage_size || size > remaining_size ||
> + ((active_size + size + VAR_METADATA_SIZE > storage_size / 2) &&
> + (remaining_size - size - VAR_METADATA_SIZE < storage_size / 2)))

This could overflow.

(u64)32768 - (u64)32768 - VAR_METADATA_SIZE < (u64)65536 / 2 == false


\
 
 \ /
  Last update: 2013-04-10 08:21    [W:0.156 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site