summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp
AgeCommit message (Collapse)Author
2015-11-12Merge to XFA: Clear decoders after the image decoder in the /Filter array.Oliver Chang
During decoding, when an image decoder is encountered, any subsequent decoders are ignored, but remain in the array. However, later on CPDF_DIBSource::ValidateDictParam expects the image decoder to be the last in the array, causing issues. A check is also added in CPDF_DIBSource::GetScanline to ensure that the calculated pitch value is <= the (4-aligned) pitch value in the cached bitmap to prevent future issues. Also cleans up some NULL usages. BUG=552046 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1406943005 . (cherry picked from commit 182d129bcee8f7731b9bbfde0064295ad3b37271) Review URL: https://codereview.chromium.org/1436153003 .
2015-11-10Merge to XFA: Fix relative includes within core/Lei Zhang
TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1427633010 . (cherry picked from commit 9fb27cb9797937499c9678bc74cf7846cbf5d2b8) Review URL: https://codereview.chromium.org/1438573002 .
2015-11-02Merge to XFA: Add a test for the HexDecode method.Dan Sinclair
I moved the declaration to be public, instead of having it implicit in one file and defined in a seperate cpp file. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1410873009 . (cherry picked from commit e948a4ee08b78e27da37bc12244fa1b66d927dc7) Review URL: https://codereview.chromium.org/1432513002 .
2015-10-28Merge to XFA: Add PDFCharIsLineEnding helperDan Sinclair
This CL adds a helper to check if a given character is a \n or \r. TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1418073006 . (cherry picked from commit 4b38229b004b7b6493cb4c4507df450adc6085f6) Review URL: https://codereview.chromium.org/1428763002 .
2015-10-22Merge to XFA: Add type cast definitions for CPDF_Array.Dan Sinclair
This Cl adds ToArray, CPDF_Object::AsArray and CPDF_Object::IsArray and updates the src to use them as needed. BUG=pdfium:201 R=thestig@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/1417893003 . (cherry picked from commit c2bfc000e502c42c9a3017038fd9104c7997d126) Review URL: https://codereview.chromium.org/1419643005 .
2015-10-21Merge to XFA: Add type cast definitions for CPDF_Name.Dan Sinclair
This Cl adds ToName, CPDF_Object::AsName and CPDF_Object::IsName and updates the src to use them as needed. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1417823005 . (cherry picked from commit 1c77edb7b34e03787605b7965784cea38ef9f1d7) Review URL: https://codereview.chromium.org/1417033004 .
2015-10-20[Merge to XFA] Revert "Revert "Add type cast definitions for CPDF_Dictionary.""Dan Sinclair
This reverts commit 937840e1722d1f2b77d80575d6e710d760662c9c. Add type cast definitions for CPDF_Dictionary. This CL adds ToCPDFDictionary type definitions and updates one file to use instead of straight casts. I had to fix two places where we'd casted off the constness of the original pointer. BUG=pdfium:201 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1420583003 . (cherry picked from commit 39869b641511c882d78e17548293cdb458c36f38) Review URL: https://codereview.chromium.org/1410343003 .
2015-10-02Merge to XFA: Fix a leak in PDF_DataDecode() on failure.Lei Zhang
Found using the test examples from https://crbug.com/537780 TBR=tsepez@chromium.org Review URL: https://codereview.chromium.org/1376413003 . (cherry picked from commit 63d0a52a6af7d327fdb5792f520cc8d93fe2f1bb) Review URL: https://codereview.chromium.org/1378303006 .
2015-08-19Merge to XFA: Extern in .cpp file is a code smell, part 2.Tom Sepez
(cherry picked from commit c3f4894a6862c74b9ab32b4ec38c531de6ecd83c) Original Review URL: https://codereview.chromium.org/1298393003 . Fixed IWYU in core/src/fpdftext/text_int.h exposed by new inclusion. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1294933008 .
2015-08-04XFA: clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
2015-07-23Merge to XFA - else after returns.Tom Sepez
(cherry picked from commit 3c012fef2bb72c8ec1faa73e11ee35539b2559d6) Original Review URL: https://codereview.chromium.org/1243953004 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1239313005 .
2015-06-11Merge to XFA: Kill FXSYS_mem{cpy,cmp,set.move}{32,8}.Tom Sepez
Only manual merge was core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp follwed by scripts. Original Review URL: https://codereview.chromium.org/1179693003. TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1179953002.
2015-06-10Merge to XFA: Remove typdefs for pointer types in fx_system.h.Tom Sepez
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
2015-06-09Merge to XFA: Use stdint.h types throughout PDFium.Tom Sepez
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
2015-05-21Merge to XFA: Fix four annoying warnings.Tom Sepez
Original Review URL: https://codereview.chromium.org/1148353002 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1150103002
2015-05-20Merge to XFA: Remove FX_Alloc() null checks now that it can't return NULL.Tom Sepez
Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1143663008
2015-05-06Merge to XFA:Remove FX_STRSIZE casts, use safe conversionsTom Sepez
Original Review URL: https://codereview.chromium.org/1124043003 BUG=pdfium:153 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1132443002
2015-04-27Merge to XFA: Reduce usage of operator LPCWSTR from CFX_WideString().Tom Sepez
Original Review URL: https://codereview.chromium.org/1101933003 TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/1108903002
2014-12-30XFA: merge patch from CL 733693003, get rid of FX_LPCSTR castBo Xu
Get rid of FX_LPCSTR cast. Follow up on https://codereview.chromium.org/733693003 R=brucedawson@chromium.org, tsepez@chromium.org Review URL: https://codereview.chromium.org/809993004
2014-07-16Remove unused variable orig_size.Bo Xu
Original patch by Andrey Khalyavin <halyavin@google.com> BUG=N/A R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/384143002
2014-06-30Remove "this==NULL" and adjust corresponding callersBo Xu
BUG= R=thakis@chromium.org Review URL: https://codereview.chromium.org/361553002
2014-06-10BUG=379656foxit
R=palmer@chromium.org Review URL: https://codereview.chromium.org/320223003
2014-06-04Use unsigned type for iteration to avoid int overflow.John Abd-El-Malek
If src_len in PDF_DecodeText is larger than 2^31, 2 * max_chars will overflow and the function will produce an incorrect result. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/306923006
2014-05-28Do not use FX_BOOL for int values.Bo Xu
BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/300063015
2014-05-27Use unsigned type for decoding in _A85Decode.Bo Xu
The local variable res can overflow over 2^31-1 and so we must use unsigned type for decoding. BUG=none R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/288983009
2014-05-23Convert all line endings to LF.John Abd-El-Malek
2014-05-17Initial commit.John Abd-El-Malek