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 338715 a267539a757f0af6bed82e8c7511d5defe1a645c
parent 338714 a50192055cef917faf8a8b6d5a9a17dae3c4c371
child 338716 7b0b4456432570977c5e289dd4d0abd309bf1ced
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [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 {