• A
    libceph: validate timespec conversions · c3f56102
    Alex Elder 提交于
    A ceph timespec contains 32-bit unsigned values for its seconds and
    nanoseconds components.  For a standard timespec, both fields are
    signed, and the seconds field is almost surely 64 bits.
    
    Add some explicit casts so the fact that this conversion is taking
    place is obvious.  Also trip a bug if we ever try to put out of
    range (negative or too big) values into a ceph timespec.
    Signed-off-by: NAlex Elder <elder@inktank.com>
    Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
    c3f56102
decode.h 6.6 KB