summaryrefslogtreecommitdiff
path: root/core/fxcodec/bmp
AgeCommit message (Collapse)Author
2018-03-21Rename "des_foo" to "dest_foo".Lei Zhang
Destination variables usually have "dest" or "dst" as the prefix. Change-Id: If5bb01a5eafe1e4b42d1a6d653abb1b444b1b2fa Reviewed-on: https://pdfium-review.googlesource.com/28970 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-02-16Fix fallthroughs in XFA code.chromium/3350Henrique Nakashima
Change-Id: I1fd4bf85cd709de1c14ed2895d045018f79bc61f Reviewed-on: https://pdfium-review.googlesource.com/26950 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-02-15Correctly seek when header size is larger then expectedchromium/3349Ryan Harrison
BUG=chromium:811733 Change-Id: Idce50b8ea4ca06fc77d5b3931557cd1d6fe48bd5 Reviewed-on: https://pdfium-review.googlesource.com/26710 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-14Check that the request was satisfied in ReadDataRyan Harrison
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>
2018-02-13Change return value of GetAvailInputRyan Harrison
This changes the return value from uint32_t to FX_FILESIZE, which is the type the methods is uses return. The existing code does an unguarded static cast, so something like -1 could cause a very large value being returned. This change has a cascading impact up to the top of the progressive codec, which now has to handle negative values gracefully. Change-Id: I813fb71e932dd5da014dbaed0dbf3bb28f8d4e9f Reviewed-on: https://pdfium-review.googlesource.com/26450 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-02-12Convert CFX_BmpDecompressor to use CFX_MemoryStreamRyan Harrison
This also adds a Seek method to CFX_MemoryStream BUG=pdfium:1007 Change-Id: I2c7e1d3b6d8aff36e302014cb2e8ffc0f23ef7c4 Reviewed-on: https://pdfium-review.googlesource.com/26230 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-02-07Check that request sizes in ReadData don't overflowRyan Harrison
When a very large, bogus value, was being passed in for the number of bytes to read, this could cause an overflow in the check for if there is data available. BUG=chromium:809824 Change-Id: I54af6655b61d39275f3ae6fabb27be2bee3fef05 Reviewed-on: https://pdfium-review.googlesource.com/25871 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-06Account for skip size before getting image ifh sizeRyan Harrison
BUG=chromium:808336 Change-Id: I84443a00e2ebaf0a1e8590464486ec92bcb0e3b5 Reviewed-on: https://pdfium-review.googlesource.com/25690 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-06Extract classes in fx_bmp.h into their own filesRyan Harrison
BUG=chromium:808336 Change-Id: I3201805a374b5403149eca701714ef4369a2e337 Reviewed-on: https://pdfium-review.googlesource.com/25630 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-06Convert BMP class name style to match other codecsRyan Harrison
BMPDecompressor -> CFX_BmpDecompressor CBmpContext -> CFX_BmpContext BUG=chromium:808336 Change-Id: If8ef5294171e3619ae1d7c5175ddf23b7673ec78 Reviewed-on: https://pdfium-review.googlesource.com/25611 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-02-06Move core/fxcodec/lbmp/ -> core/fxcodec/bmp/Ryan Harrison
BUG=chromium:808336 Change-Id: Id721787dd77d1bcac6daf6e3c149f79e8d1d9fe4 Reviewed-on: https://pdfium-review.googlesource.com/25610 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>