filter/source/graphicfilter/ipcx/ipcx.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit d0be09322d127e7d517851db38c764d57fbab2dc Author: Caolán McNamara <caol...@redhat.com> Date: Tue Oct 21 17:20:15 2014 +0100 coverity#1242908 Untrusted value as argument Change-Id: If9dd92c361d406c435329d29870dc8bb07a8ba7b diff --git a/filter/source/graphicfilter/ipcx/ipcx.cxx b/filter/source/graphicfilter/ipcx/ipcx.cxx index 283cdeb..af82bd3 100644 --- a/filter/source/graphicfilter/ipcx/ipcx.cxx +++ b/filter/source/graphicfilter/ipcx/ipcx.cxx @@ -217,6 +217,13 @@ void PCXReader::ImplReadBody(BitmapWriteAccess * pAcc) sal_uLong nLastPercent = 0; sal_uInt8 nDat = 0, nCol = 0; + //sanity check there is enough data before trying allocation + if (nPlanes > m_rPCX.remainingSize() / nBytesPerPlaneLin) + { + nStatus = false; + return; + } + for( np = 0; np < nPlanes; np++ ) pPlane[ np ] = new sal_uInt8[ nBytesPerPlaneLin ];
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits