diff options
-rw-r--r-- | vcl/source/filter/ipcd/ipcd.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vcl/source/filter/ipcd/ipcd.cxx b/vcl/source/filter/ipcd/ipcd.cxx index b3377c8934e3..dbe7eb12d5db 100644 --- a/vcl/source/filter/ipcd/ipcd.cxx +++ b/vcl/source/filter/ipcd/ipcd.cxx @@ -226,10 +226,14 @@ void PCDReader::ReadImage() m_rPCD.Seek( nImagePos ); // next pair of rows := first pair of rows: - m_rPCD.ReadBytes( pL0N, nWidth ); - m_rPCD.ReadBytes( pL1N, nWidth ); - m_rPCD.ReadBytes( pCbN, nW2 ); - m_rPCD.ReadBytes( pCrN, nW2 ); + if (m_rPCD.ReadBytes(pL0N, nWidth) != nWidth || + m_rPCD.ReadBytes(pL1N, nWidth) != nWidth || + m_rPCD.ReadBytes(pCbN, nW2) != nW2 || + m_rPCD.ReadBytes(pCrN, nW2) != nW2) + { + bStatus = false; + return; + } pCbN[ nW2 ] = pCbN[ nW2 - 1 ]; pCrN[ nW2 ] = pCrN[ nW2 - 1 ]; |