Kaydet (Commit) 850b8dc7 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1242483 Unintentional integer overflow

Change-Id: Ie258b4b6d4d99c7b2b0d61550a840539b216d09f
üst ba8469f6
......@@ -343,9 +343,8 @@ BitmapBuffer* X11SalBitmap::ImplCreateDIB(
else if( aSrcBuf.mnBitCount <= 8 )
{
const SalColormap& rColMap = pSalDisp->GetColormap( nScreen );
const sal_uInt16 nCols = std::min( (sal_uLong)rColMap.GetUsed()
, (sal_uLong)(1 << nDrawableDepth)
);
const sal_uInt16 nCols = std::min((sal_uLong)rColMap.GetUsed(),
sal_uLong(1) << nDrawableDepth);
rPal.SetEntryCount( nCols );
pDstPal = &rPal;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment