Skip to content

Commit 6a91098

Browse files
committed
Address Bénédikt's review
1 parent 4735195 commit 6a91098

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Modules/_hashopenssl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,14 +1683,14 @@ pbkdf2_hmac_impl(PyObject *module, const char *hash_name,
16831683

16841684
PyBytesWriter *writer = PyBytesWriter_Create(dklen);
16851685
if (writer == NULL) {
1686-
return NULL;
1686+
goto end;
16871687
}
16881688

16891689
Py_BEGIN_ALLOW_THREADS
16901690
retval = PKCS5_PBKDF2_HMAC((const char *)password->buf, (int)password->len,
16911691
(const unsigned char *)salt->buf, (int)salt->len,
16921692
iterations, digest, dklen,
1693-
PyBytesWriter_GetData(writer));
1693+
(unsigned char *)PyBytesWriter_GetData(writer));
16941694
Py_END_ALLOW_THREADS
16951695

16961696
if (!retval) {
@@ -1798,7 +1798,7 @@ _hashlib_scrypt_impl(PyObject *module, Py_buffer *password, Py_buffer *salt,
17981798
(const char *)password->buf, (size_t)password->len,
17991799
(const unsigned char *)salt->buf, (size_t)salt->len,
18001800
(uint64_t)n, (uint64_t)r, (uint64_t)p, (uint64_t)maxmem,
1801-
PyBytesWriter_GetData(writer), (size_t)dklen
1801+
(unsigned char *)PyBytesWriter_GetData(writer), (size_t)dklen
18021802
);
18031803
Py_END_ALLOW_THREADS
18041804

0 commit comments

Comments
 (0)