lkml.org 
[lkml]   [2019]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH -next] tpm: change the return type of calc_tpm2_event_size to size_t
    From
    Date
    On 2019/2/19 16:59, Jarkko Sakkinen wrote:
    > On Tue, Feb 19, 2019 at 03:26:18PM +0800, YueHaibing wrote:
    >> calc_tpm2_event_size return size of the event which type is
    >> size_t, If it is an invalid event, returns 0. And all the
    >> caller use a size_t variable to check the return value, so
    >> no need to convert to the return value type to int.
    >>
    >> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
    >
    > I don't see this patch make any value.

    calc_tpm2_event_size return size_t 'size' which derive from u32 'event_field->event_size',

    convert it to int may result in truncation.

    >
    > /Jarkko
    >
    > .
    >

    \
     
     \ /
      Last update: 2019-02-19 10:17    [W:3.361 / U:1.692 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site