fix potential problem overwriting dma region
authorRoland Scheidegger <rscheidegger@gmx.ch>
Fri, 6 Feb 2004 15:23:20 +0000 (15:23 +0000)
committerRoland Scheidegger <rscheidegger@gmx.ch>
Fri, 6 Feb 2004 15:23:20 +0000 (15:23 +0000)
src/mesa/drivers/dri/radeon/radeon_texmem.c

index 09289bab670a3bcae9f62e4ea5843c000cf755c3..c985267d6b9ed072d5092dc1cbbc27d66f428d88 100644 (file)
@@ -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 );