Skip to content

Commit f87df8a

Browse files
authored
Merge pull request #153 from WOnder93/master
Fix bad pointer copy when using custom allocator
2 parents 9dc74e1 + 91f7a15 commit f87df8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ int initialize(argon2_instance_t *instance, argon2_context *context) {
575575
if (ARGON2_OK != result) {
576576
return result;
577577
}
578-
memcpy(&(instance->memory), p, sizeof(instance->memory));
578+
instance->memory = (block *)p;
579579
} else {
580580
result = allocate_memory(&(instance->memory), instance->memory_blocks);
581581
if (ARGON2_OK != result) {

0 commit comments

Comments
 (0)