diff options
author | Michael Stahl <mstahl@redhat.com> | 2014-01-29 14:55:47 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2014-01-29 15:06:00 +0100 |
commit | 2ca79052d0fab159b017cacd3d7145d8012de850 (patch) | |
tree | d15b766e421294e5f91044e8ac3c880069b56b91 /vcl | |
parent | 6a44abaae5dc486b995be02cd4ba5275b9ef2877 (diff) |
vcl: try to fix sizes in ImplBlendToBitmap()
Since commit 2f84b420e0428693fb2d45b68afdc9023dfc08bc,
sw_unoapi test sw.SwAccessibleEndnoteView crashes while trying to blend
a 1107x8 Bitmap into a 97x8 Bitmap; it's not obvious that any of the
parameters passed in is wrong and it's odd that ImplBlendToBitmap()
would use rSrcBuffer.mnHeight and rDstBuffer.mnWidth; presumably
it should use both height and width of the same buffer.
Change-Id: I40b98ba56e703323df91f6fd7773addcfd69a402
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/bmpfast.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vcl/source/gdi/bmpfast.cxx b/vcl/source/gdi/bmpfast.cxx index 0fe79eacc3b3..30c1ccfa8399 100644 --- a/vcl/source/gdi/bmpfast.cxx +++ b/vcl/source/gdi/bmpfast.cxx @@ -608,7 +608,8 @@ bool ImplBlendToBitmap( TrueColorPixelPtr<SRCFMT>& rSrcLine, nDstLinestep = -nDstLinestep; } - for( int y = rSrcBuffer.mnHeight; --y >= 0; ) + assert(rDstBuffer.mnHeight <= rSrcBuffer.mnHeight); // not sure about that? + for (int y = rDstBuffer.mnHeight; --y >= 0;) { ImplBlendLines<8>( aDstLine, rSrcLine, aMskLine, rDstBuffer.mnWidth ); aDstLine.AddByteOffset( nDstLinestep ); |