[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnulib-bug
Subject:    Re: incorrect large buffer handling in md5.c/sha1.c/sha256.c/sha512.c
From:       Serge Belyshev <belyshev () depni ! sinp ! msu ! ru>
Date:       2012-05-19 4:35:36
Message-ID: 87pqa0okiv.fsf () depni ! sinp ! msu ! ru
[Download RAW message or body]

Paul Eggert <eggert@cs.ucla.edu> writes:

> On 05/18/2012 01:29 PM, Serge Belyshev wrote:
>
>> this part does exactly the same: increment ctx->total [1] by one, where
>> larger increment may be needed.
>
> OK, I see.  But this bug can only happen on unusual hosts, right?
> I.e., hosts where size_t is wider than 64 bits, or where
> uint64_t does not exist.  Anyway, the bug can easily be fixed even
> if it's only on unusual hosts, so I pushed this further patch.

Correct, size_t needs to be larger than 64 bits. Rather hard to imagine
a computer processing more than 2^64 bits of data in a single call in a
finite time, and I must confess I overlooked this initially, but still
it needs to be at least mentioned in the code.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic