fix memcpy with same src and dest (Peter Klotz)

pull/2/head
weidai 2010-08-03 20:28:10 +00:00
parent 05e42a01d9
commit 79ed03344b
1 changed files with 2 additions and 1 deletions

View File

@ -66,6 +66,7 @@ template <class T, class BASE> void IteratedHashBase<T, BASE>::Update(const byte
} while (len >= blockSize);
}
if (len && data != input)
memcpy(data, input, len);
}