From 786e822cd4e4f5fb7a4177f7711683b14d2f2bc9 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Fri, 6 Feb 2004 15:23:20 +0000 Subject: [PATCH] fix potential problem overwriting dma region --- src/mesa/drivers/dri/radeon/radeon_texmem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 ); -- 2.30.2