From 51b3e9a653af23c00efc27c05045a74211e7fd5c Mon Sep 17 00:00:00 2001 From: lloyd Date: Wed, 23 Dec 2009 01:41:08 +0000 Subject: Use a u32bit for the length argument to ubi_512. That value cannot possibly be larger than 4294967232 because you can give at most 2^32-1 bytes of data at a time to Skein_512::add_data, and Skein always needs to buffer at least one byte. --- src/hash/skein/skein_512.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/hash/skein/skein_512.cpp') diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp index 2c6aa121c..cb4b7a7a2 100644 --- a/src/hash/skein/skein_512.cpp +++ b/src/hash/skein/skein_512.cpp @@ -27,11 +27,11 @@ enum type_code { SKEIN_OUTPUT = 63 }; -void ubi_512(u64bit H[9], u64bit T[], const byte msg[], u64bit msg_len) +void ubi_512(u64bit H[9], u64bit T[], const byte msg[], u32bit msg_len) { do { - const u64bit to_proc = std::min(msg_len, 64); + const u32bit to_proc = std::min(msg_len, 64); T[0] += to_proc; u64bit M[8] = { 0 }; -- cgit v1.2.3