diff options
author | lloyd <[email protected]> | 2009-07-14 13:10:13 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-07-14 13:10:13 +0000 |
commit | 8c95db1b5a45df7823ea80a22d6eb7c692e90a6f (patch) | |
tree | 18b37bd5c7ee1034d015ce1238d33d659a2e8e0b /src/hash/skein/skein_512.cpp | |
parent | f2e1b23ea9400b1fe593273bb43c838fc63545a1 (diff) |
Avoid a crash in Skein_512::add_data if it is called with a zero-length
input vector.
Diffstat (limited to 'src/hash/skein/skein_512.cpp')
-rw-r--r-- | src/hash/skein/skein_512.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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); |