bochs: backport overlapping memcpy fix
Upstream SVN r12563: "Bugfix: use memmove() if source and destination range can overlap (found with valgrind)." (Manually backported, the code structure has significantly changed before this fix.) Change-Id: Id176fb5b0aca806908cfb06f06bb5a7221ccc9c4
This commit is contained in:
@ -3120,7 +3120,7 @@ void bx_hard_drive_c::init_mode_sense_single(Bit8u channel, const void* src, int
|
||||
BX_SELECTED_CONTROLLER(channel).buffer[7] = 0; // reserved
|
||||
|
||||
// Data
|
||||
memcpy(BX_SELECTED_CONTROLLER(channel).buffer + 8, src, size);
|
||||
memmove(BX_SELECTED_CONTROLLER(channel).buffer + 8, src, size);
|
||||
}
|
||||
|
||||
void BX_CPP_AttrRegparmN(1)
|
||||
|
||||
Reference in New Issue
Block a user