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:
Horst Schirmeier
2016-08-06 17:29:30 +02:00
parent a2798cc2bf
commit fbd788f05e
3 changed files with 3 additions and 3 deletions

View File

@ -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)