Fix crash in SHA1

refs #4991
This commit is contained in:
Gunnar Beutner 2017-03-20 10:19:53 +01:00 committed by Michael Friedrich
parent 2773d93d40
commit 0c25d14d0c
1 changed files with 1 additions and 1 deletions

View File

@ -622,7 +622,7 @@ String SHA1(const String& s, bool binary)
}
if (binary)
return String(reinterpret_cast<const char*>(digest));
return String(reinterpret_cast<const char*>(digest), reinterpret_cast<const char *>(digest + SHA_DIGEST_LENGTH));
char output[SHA_DIGEST_LENGTH*2+1];
for (int i = 0; i < 20; i++)