Skip to content

Commit

Permalink
Backport be1d374bc54d43aae3b3c1feace22d38fe2156b6
Browse files Browse the repository at this point in the history
  • Loading branch information
duke committed Aug 28, 2024
1 parent 6f382d1 commit 62b0c10
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/hotspot/share/memory/guardedMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ void* GuardedMemory::wrap_copy(const void* ptr, const size_t len, const void* ta
if (outerp != NULL) {
GuardedMemory guarded(outerp, len, tag);
void* innerp = guarded.get_user_ptr();
memcpy(innerp, ptr, len);
if (ptr != nullptr) {
memcpy(innerp, ptr, len);
}
return innerp;
}
return NULL; // OOM
Expand Down

0 comments on commit 62b0c10

Please sign in to comment.