From 8c95db1b5a45df7823ea80a22d6eb7c692e90a6f Mon Sep 17 00:00:00 2001 From: lloyd Date: Tue, 14 Jul 2009 13:10:13 +0000 Subject: Avoid a crash in Skein_512::add_data if it is called with a zero-length input vector. --- src/hash/skein/skein_512.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hash/skein/skein_512.cpp b/src/hash/skein/skein_512.cpp index eaef641ed..51eef262c 100644 --- a/src/hash/skein/skein_512.cpp +++ b/src/hash/skein/skein_512.cpp @@ -193,6 +193,9 @@ void Skein_512::clear() throw() void Skein_512::add_data(const byte input[], u32bit length) { + if(length == 0) + return; + if(buf_pos) { buffer.copy(buf_pos, input, length); -- cgit v1.2.3