Check that the request was satisfied in ReadData

Currently the BMP decompressor doesn't verify the
returned data length was the amount requested. This
means we may end up with part of our structure
uninitialized if we didn't copy in enough data.

This CL verifies the length of data copied is the
size we require.

BUG=chromium:811853

Change-Id: I20e0e9b3ff1176a620fcb38c3c7e585848b7e428
Reviewed-on: https://pdfium-review.googlesource.com/26850
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
diff --git a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
index 71909d2..d8f2b8d 100644
--- a/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
+++ b/core/fxcodec/bmp/cfx_bmpdecompressor.cpp
@@ -637,7 +637,7 @@
 }
 
 bool CFX_BmpDecompressor::ReadData(uint8_t* destination, uint32_t size) {
-  return input_buffer_ && input_buffer_->ReadBlock(destination, size);
+  return input_buffer_ && input_buffer_->ReadBlock(destination, size) == size;
 }
 
 void CFX_BmpDecompressor::SaveDecodingStatus(int32_t status) {