Commit 1a49822d authored by Adam Reichold's avatar Adam Reichold
Browse files

Copy the string contents, not the string object, into the key buffer. Closes #690

parent 641312cb
Pipeline #12910 passed with stage
in 14 minutes and 2 seconds
......@@ -1717,7 +1717,7 @@ static void revision6Hash(const GooString *inputPassword, unsigned char *K, cons
sequenceLength = inputPasswordLength + KLength + userKeyLength;
totalLength = 64 * sequenceLength;
//a.make the string K1
memcpy(K1, inputPassword, inputPasswordLength);
memcpy(K1, inputPassword->c_str(), inputPasswordLength);
memcpy(K1 + inputPasswordLength, K , KLength);
memcpy(K1 + inputPasswordLength + KLength, userKey, userKeyLength);
for(int i = 1; i < 64 ; ++i) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment