lkml.org 
[lkml]   [2012]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] tpm: Move tpm_get_random api into the TPM device driver
On 07/27/2012 07:49 AM, Kent Yoder wrote:
>>
>>> case Opt_new:
>>> - ret = my_get_random(payload->key, payload->key_len);
>>> + ret = tpm_get_random(TPM_ANY_NUM, payload->key,
>>> + &payload->key_len);
>>
>> payload->key_len is unsigned int, not size_t; this causes an
>> overwrite of blob_len on 64-bit platforms.
>
> Good catch.
>

It generated a compiler warning, so that one was trivial to spot.

-hpa


--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.



\
 
 \ /
  Last update: 2012-07-27 17:41    [W:0.044 / U:3.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site