Bug 1046205. Fix depth pitch read out of bounds. r=bas
authorMason Chang <mchang@mozilla.com>
Tue, 31 May 2016 08:28:42 -0700
changeset 340728 a267539a757f0af6bed82e8c7511d5defe1a645c
parent 340727 a50192055cef917faf8a8b6d5a9a17dae3c4c371
child 340729 7b0b4456432570977c5e289dd4d0abd309bf1ced
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas
bugs1046205
milestone49.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1046205. Fix depth pitch read out of bounds. r=bas
gfx/layers/d3d11/TextureD3D11.cpp
--- a/gfx/layers/d3d11/TextureD3D11.cpp
+++ b/gfx/layers/d3d11/TextureD3D11.cpp
@@ -930,17 +930,17 @@ DataTextureSourceD3D11::Update(DataSourc
         box.back = 1;
         box.left = rect.x;
         box.top = rect.y;
         box.right = rect.XMost();
         box.bottom = rect.YMost();
 
         void* data = map.mData + map.mStride * rect.y + BytesPerPixel(aSurface->GetFormat()) * rect.x;
 
-        mCompositor->GetDC()->UpdateSubresource(mTexture, 0, &box, data, map.mStride, map.mStride * mSize.height);
+        mCompositor->GetDC()->UpdateSubresource(mTexture, 0, &box, data, map.mStride, map.mStride * rect.height);
       }
     } else {
       mCompositor->GetDC()->UpdateSubresource(mTexture, 0, nullptr, aSurface->GetData(),
                                               aSurface->Stride(), aSurface->Stride() * mSize.height);
     }
 
     aSurface->Unmap();
   } else {