From: Roland Scheidegger Date: Fri, 6 Feb 2004 15:23:20 +0000 (+0000) Subject: fix potential problem overwriting dma region X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=786e822cd4e4f5fb7a4177f7711683b14d2f2bc9;p=mesa.git fix potential problem overwriting dma region --- diff --git a/src/mesa/drivers/dri/radeon/radeon_texmem.c b/src/mesa/drivers/dri/radeon/radeon_texmem.c index 09289bab670..c985267d6b9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texmem.c +++ b/src/mesa/drivers/dri/radeon/radeon_texmem.c @@ -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 );