[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: incorrect large buffer handling in md5.c/sha1.c/sha256.c/sha512.c
From: |
Serge Belyshev |
Subject: |
Re: incorrect large buffer handling in md5.c/sha1.c/sha256.c/sha512.c |
Date: |
Sat, 19 May 2012 08:35:36 +0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) |
Paul Eggert <address@hidden> 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.