mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
fix potential problem overwriting dma region
This commit is contained in:
parent
531b59db3c
commit
786e822cd4
1 changed files with 2 additions and 2 deletions
|
|
@ -135,10 +135,10 @@ static void radeonUploadRectSubImage( radeonContextPtr rmesa,
|
|||
__FUNCTION__, src_pitch, dstPitch);
|
||||
|
||||
if (src_pitch == dstPitch) {
|
||||
memcpy( region.address, tex, lines * src_pitch );
|
||||
memcpy( region.address + region.start, tex, lines * src_pitch );
|
||||
}
|
||||
else {
|
||||
char *buf = region.address;
|
||||
char *buf = region.address + region.start;
|
||||
int i;
|
||||
for (i = 0 ; i < lines ; i++) {
|
||||
memcpy( buf, tex, src_pitch );
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue