pdfium.git
5 years agoInteger overflow in fx_basic.h and fx_memory.h
foxit [Mon, 7 Jul 2014 20:53:16 +0000]
Integer overflow in fx_basic.h and fx_memory.h

BUG=382656
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/334573007

5 years agoFix uninitialized RGB in LoadPalette
foxit [Mon, 7 Jul 2014 20:50:21 +0000]
Fix uninitialized RGB in LoadPalette

BUG=387506
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/361103002

5 years agoFix uninitialized font_offset
foxit [Mon, 7 Jul 2014 20:42:30 +0000]
Fix uninitialized font_offset

BUG=387840
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/354413002

5 years agoFix syntax error in BUILD.gn
John Abd-El-Malek [Mon, 30 Jun 2014 19:54:56 +0000]
Fix syntax error in BUILD.gn

5 years agoFix checklicenses in chromium
John Abd-El-Malek [Mon, 30 Jun 2014 19:30:03 +0000]
Fix checklicenses in chromium

5 years agoRemove "this==NULL" and adjust corresponding callers
Bo Xu [Mon, 30 Jun 2014 16:49:21 +0000]
Remove "this==NULL" and adjust corresponding callers

BUG=
R=thakis@chromium.org

Review URL: https://codereview.chromium.org/361553002

5 years agoFix standalone build.
John Abd-El-Malek [Mon, 30 Jun 2014 16:26:25 +0000]
Fix standalone build.

BUG=20
R=jschuh@chromium.org

Review URL: https://codereview.chromium.org/349033008

5 years agoImport Chromium base/numerics to resolve integer overflow.
Chris Palmer [Thu, 26 Jun 2014 23:01:46 +0000]
Import Chromium base/numerics to resolve integer overflow.

We'll use this for integer overflows going forward.

BUG=382606
R=jam@chromium.org

Review URL: https://codereview.chromium.org/349363005

5 years agoExplicitly use binary mode when opening files in the pdfium_test sample.
John Abd-El-Malek [Thu, 26 Jun 2014 17:18:11 +0000]
Explicitly use binary mode when opening files in the pdfium_test sample.

This patch adds the 'b' (binary mode) flag to the fopen calls.

Before the fix the PPM images written with --write_images were corrupted
under Windows because on this platform in text mode all occurrences of
the byte 0xa (line feed) are replaced with the bytes 0x0d (carriage
return) and 0x0a (line feed).

On UNIX platforms the 'b' flag is supported but ignored, because no
translation of the line feed character takes place.

BUG=18
R=jam@chromium.org

Original patch by Michael Doppler <m.doppler@gmail.com>

Review URL: https://codereview.chromium.org/343303004

5 years agoFix and integer overflow issue in SDK's QuickSort
Bo Xu [Tue, 24 Jun 2014 18:37:49 +0000]
Fix and integer overflow issue in SDK's QuickSort

BUG=382639
R=mdempsky@chromium.org

Review URL: https://codereview.chromium.org/354673002

5 years agoRevert "Import Chromium base/numerics to resolve integer overflow."
John Abd-El-Malek [Mon, 23 Jun 2014 22:24:28 +0000]
Revert "Import Chromium base/numerics to resolve integer overflow."

This reverts commit d9713f05fdcecab8428d39034c6b84cd0bbd2920.

This is breaking compile.

5 years agoBUG=382241
foxit [Sat, 21 Jun 2014 00:07:21 +0000]
BUG=382241
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/331123002

5 years agoFix a crash in CFXMEM_FixedMgr::AllocLarge
foxit [Sat, 21 Jun 2014 00:03:04 +0000]
Fix a crash in CFXMEM_FixedMgr::AllocLarge

BUG=382243
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/333213002

5 years agoStack-buffer-overflow in IccLib_Translate
foxit [Fri, 20 Jun 2014 23:48:43 +0000]
Stack-buffer-overflow in IccLib_Translate

BUG=382240
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/332143002

5 years agoImport Chromium base/numerics to resolve integer overflow.
Chris Palmer [Fri, 20 Jun 2014 23:30:49 +0000]
Import Chromium base/numerics to resolve integer overflow.

We'll use this for integer overflows going forward.

BUG=382606
R=bo_xu@foxitsoftware.com, jschuh@chromium.org

Review URL: https://codereview.chromium.org/341533007

5 years agoFix JS_WIDESTRING to work with clang-cl
John Abd-El-Malek [Thu, 19 Jun 2014 15:07:13 +0000]
Fix JS_WIDESTRING to work with clang-cl

MSVC lexes L#macro_arg as a single wide string literal token, but
Clang and other C/C++ compliant lexers do not.  There was already
a workaround to use implicit string concatenation for GCC, but there's
a simpler solution of token pasting the L onto the stringized macro
argument with 'L###macro_arg'.  This works with Clang, GCC, and MSVC.

R=jun_fang@foxitsoftware.com, jam@chromium.org
BUG=82385

Original patch by Reid Kleckner <rnk@chromium.org>

Review URL: https://codereview.chromium.org/345643002

5 years agoresolve symbol collsion with zlib 1.2.8
Bo Xu [Thu, 12 Jun 2014 20:42:40 +0000]
resolve symbol collsion with zlib 1.2.8

R=jam@chromium.org

Review URL: https://codereview.chromium.org/330023004

5 years agoAdd FPDFPage_SetRotation function
Bo Xu [Thu, 12 Jun 2014 20:41:50 +0000]
Add FPDFPage_SetRotation function

R=jam@chromium.org

Review URL: https://codereview.chromium.org/336563004

5 years agoEnable security removal in FPDF_Doc_Save
Bo Xu [Thu, 12 Jun 2014 20:40:04 +0000]
Enable security removal in FPDF_Doc_Save

R=jam@chromium.org

Review URL: https://codereview.chromium.org/333753002

5 years agoBring back the Skia files from the old repo.
John Abd-El-Malek [Wed, 11 Jun 2014 20:34:16 +0000]
Bring back the Skia files from the old repo.

BUG=11

5 years agoBUG=379656
foxit [Tue, 10 Jun 2014 21:40:42 +0000]
BUG=379656
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/320223003

5 years agofree, rather than delete, malloc'd object.
John Abd-El-Malek [Mon, 9 Jun 2014 23:10:57 +0000]
free, rather than delete, malloc'd object.

BUG=381031

Original patch by Chris Palmer <palmer@chromium.org>

Review URL: https://codereview.chromium.org/322453002

5 years agoDisable pointer-to-int conversion warning.
John Abd-El-Malek [Mon, 9 Jun 2014 23:07:18 +0000]
Disable pointer-to-int conversion warning.

In this case the warning is benign.

Original patch by Brett Wilson <brettw@chromium.org>

R=jam@chromium.org

Review URL: https://codereview.chromium.org/319033002

5 years agoFix a crash when parsing truetype fonts without any tables.
Lei Zhang [Mon, 9 Jun 2014 19:16:58 +0000]
Fix a crash when parsing truetype fonts without any tables.

BUG=chromium:381011
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/317203003

5 years agoUse none SSE functions when data is not 16 byte aligned
foxit [Sun, 8 Jun 2014 23:35:48 +0000]
Use none SSE functions when data is not 16 byte aligned

BUG=
R=jabdelmalek@google.com

Review URL: https://codereview.chromium.org/318593002

5 years agoAdd GN build file for pdfium, rename GYP target.
John Abd-El-Malek [Thu, 5 Jun 2014 19:45:33 +0000]
Add GN build file for pdfium, rename GYP target.

The GYP target is now called "pdfium" rather than "fpdfsdk".

Original pach by Brett Wilson <brettw@chromium.org>

5 years agofix two uninitialized reads
John Abd-El-Malek [Thu, 5 Jun 2014 18:12:52 +0000]
fix two uninitialized reads
https://code.google.com/p/pdfium/issues/detail?id=9
https://code.google.com/p/pdfium/issues/detail?id=10

BUG=
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/312273002

5 years agoUse unsigned type for iteration to avoid int overflow.
John Abd-El-Malek [Wed, 4 Jun 2014 21:42:19 +0000]
Use unsigned type for iteration to avoid int overflow.

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

5 years agoWrong variable assignment in Pdfium.
John Abd-El-Malek [Wed, 4 Jun 2014 17:52:59 +0000]
Wrong variable assignment in Pdfium.

CID=115579

Original patch by Finnur Thorarinsson <finnur@chromium.org>

5 years agoIn linux and mac, use Arial to replace Tahoma for displaying east europe characters
Bo Xu [Thu, 29 May 2014 18:32:56 +0000]
In linux and mac, use Arial to replace Tahoma for displaying east europe characters

BUG=

Review URL: https://codereview.chromium.org/301263002

5 years agoFix xcode build.
John Abd-El-Malek [Thu, 29 May 2014 15:01:22 +0000]
Fix xcode build.

R=thakis@chromium.org

Review URL: https://codereview.chromium.org/300993002

5 years agoFollowup comments from https://codereview.chromium.org/298893007/
John Abd-El-Malek [Wed, 28 May 2014 20:35:54 +0000]
Followup comments from https://codereview.chromium.org/298893007/

R=thakis@chromium.org

Review URL: https://codereview.chromium.org/302653009

5 years agoFix a security issue in FPDF_GetMetaText
Bo Xu [Wed, 28 May 2014 17:21:47 +0000]
Fix a security issue in FPDF_GetMetaText

BUG=security

Review URL: https://codereview.chromium.org/307653002

5 years agoDo not use FX_BOOL for int values.
Bo Xu [Wed, 28 May 2014 16:55:07 +0000]
Do not use FX_BOOL for int values.

BUG=none
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/300063015

5 years agoFix licenses in headers to pass Chromium's checklicenses tool.
Lei Zhang [Wed, 28 May 2014 00:15:56 +0000]
Fix licenses in headers to pass Chromium's checklicenses tool.

BUG=chromium:374943
R=jam@chromium.org

Review URL: https://codereview.chromium.org/303723004

5 years agoAdd Lei to AUTHORS
John Abd-El-Malek [Wed, 28 May 2014 00:04:52 +0000]
Add Lei to AUTHORS

5 years agoadjust output dir for msvs to fix msvs link error
Bo Xu [Tue, 27 May 2014 23:03:22 +0000]
adjust output dir for msvs to fix msvs link error

BUG=msvs build
R=jam@chromium.org

Review URL: https://codereview.chromium.org/295323004

5 years agoChange cc list to be pdfium-reviews@googlegroups.com
John Abd-El-Malek [Tue, 27 May 2014 21:04:03 +0000]
Change cc list to be pdfium-reviews@googlegroups.com

5 years agoUse unsigned type for decoding in _A85Decode.
Bo Xu [Tue, 27 May 2014 18:05:32 +0000]
Use unsigned type for decoding in _A85Decode.

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

5 years agoFix memory leak on array size overflow.
Bo Xu [Tue, 27 May 2014 17:55:08 +0000]
Fix memory leak on array size overflow.

BUG=none
R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/300023002

5 years agoFix build error on Windows stand alone build.
John Abd-El-Malek [Tue, 27 May 2014 01:27:11 +0000]
Fix build error on Windows stand alone build.

R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/299353008

5 years agoFix build error on win x64.
John Abd-El-Malek [Mon, 26 May 2014 19:54:31 +0000]
Fix build error on win x64.

5 years agoMove linker settings from standalone.gypi to pdfium.gyp, since they're needed when...
John Abd-El-Malek [Mon, 26 May 2014 18:48:05 +0000]
Move linker settings from standalone.gypi to pdfium.gyp, since they're needed when linking pdfium_test as part of other projects' gyp files as well where standalone.gypi isn't used.

R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/302453004

5 years agoFix warnings in android build, fix font rendering issue, fix issue 357588: wrong...
Bo Xu [Sat, 24 May 2014 19:20:17 +0000]
Fix warnings in android build, fix font rendering issue, fix issue 357588: wrong characters representation, and addjust some code indent

BUG=
R=jam@chromium.org

Review URL: https://codereview.chromium.org/294353002

5 years agoFix a typo with PAGEMODE_UNKNOWN.
Lei Zhang [Sat, 24 May 2014 07:37:54 +0000]
Fix a typo with PAGEMODE_UNKNOWN.

R=jam@chromium.org

Review URL: https://codereview.chromium.org/297993002

5 years agoSwitch include paths to fpdfsdk back to be relative so that pdfium_test can be built...
John Abd-El-Malek [Sat, 24 May 2014 02:27:48 +0000]
Switch include paths to fpdfsdk back to be relative so that pdfium_test can be built from a Chromium checkout.

5 years agoRemove gcctest target which is not needed anymore.
John Abd-El-Malek [Sat, 24 May 2014 00:59:39 +0000]
Remove gcctest target which is not needed anymore.

Original patch by Andrey Khalyavin <halyavin@chromium.org>

5 years agoremove Microsoft SDK
John Abd-El-Malek [Sat, 24 May 2014 00:49:55 +0000]
remove Microsoft SDK

Original patch by Lucas Nihlen <luken@chromium.org>

5 years agoAdd a .gitattributes with "* text=auto" so that new lines are
John Abd-El-Malek [Sat, 24 May 2014 00:46:18 +0000]
Add a .gitattributes with "* text=auto" so that new lines are
automatically converted to the native platform's format on checkout but
are committed as "LF".

BUG=375516

Original patch from Julien Tinnes <jln@chromium.org>

5 years agoConvert all line endings to LF.
John Abd-El-Malek [Sat, 24 May 2014 00:28:10 +0000]
Convert all line endings to LF.

5 years agoFix line endings.
John Abd-El-Malek [Sat, 24 May 2014 00:13:20 +0000]
Fix line endings.

5 years agoAdd execute permission to script
John Abd-El-Malek [Fri, 23 May 2014 23:59:18 +0000]
Add execute permission to script

5 years agoCreate a standalone pdfium build.
John Abd-El-Malek [Thu, 22 May 2014 23:14:52 +0000]
Create a standalone pdfium build.

I moved pdfium_test from chromium's repo to pdfium's. It's now buildable as a sample following the instructions on the wiki.

5 years agoRevert the changes to pdfium.gyp in 4db62f5. To completely fix all the errors on...
John Abd-El-Malek [Thu, 22 May 2014 21:22:16 +0000]
Revert the changes to pdfium.gyp in 4db62f5. To completely fix all the errors on all platforms we'd have to make changes to third party libraries. Some of those libraries are already shipped in chrome, and if we are going to want to share them we don't want them to diverge.

5 years agoAdd Nico to AUTHORS.
John Abd-El-Malek [Wed, 21 May 2014 20:00:43 +0000]
Add Nico to AUTHORS.

5 years agoDon't remove -Wheader-hygiene for pdfium, 41f0590a9d7 fixed all violations.
Nico Weber [Wed, 21 May 2014 19:54:46 +0000]
Don't remove -Wheader-hygiene for pdfium, 41f0590a9d7 fixed all violations.

BUG=375558

5 years agoAdd Raymes to AUTHORS
John Abd-El-Malek [Wed, 21 May 2014 19:52:45 +0000]
Add Raymes to AUTHORS

5 years agoAdd codereview.settings and OWNERS for pdfium
Raymes Khoury [Wed, 21 May 2014 19:48:54 +0000]
Add codereview.settings and OWNERS for pdfium

5 years agoFix clang warnings so we can treat warnings as errors.
John Abd-El-Malek [Wed, 21 May 2014 19:41:01 +0000]
Fix clang warnings so we can treat warnings as errors.

5 years agoAdd Matt Giuca to AUTHORS.
John Abd-El-Malek [Tue, 20 May 2014 21:36:45 +0000]
Add Matt Giuca to AUTHORS.

5 years agoFixed or silenced all warnings and turned on warnings-as-errors.
John Abd-El-Malek [Tue, 20 May 2014 21:34:30 +0000]
Fixed or silenced all warnings and turned on warnings-as-errors.

- Silence -Wheader-hygiene warning on Clang. Between fx_agg_driver.cpp
and fxjs_v8.h there are hundreds or thousands of things that depend on
"using namespace", so it is best to just suppress this warning than
fix it.
- gzguts.h: Include unistd.h on all non-Windows platforms, not just
Apple platforms. Fixes implicit include warnings on Linux.
- Added parens to silence a warning about mixing && and ||.
- Removed a check if an enum is negative. Enums can be unsigned,
generating an always-false warning. The check isn't necessary.
- Removed some statements that are just names of variables that do
nothing.

BUG=375114

Patch by Matt Giuca <mgiuca@chromium.org>

5 years agocf2hints: Fix early loop termination causing hints to be ignored.
John Abd-El-Malek [Tue, 20 May 2014 20:11:44 +0000]
cf2hints: Fix early loop termination causing hints to be ignored.

There was a comparison that checks maskEndPtr >= maskEndPtr. It has been
fixed to maskPtr >= maskEndPtr.

BUG=375139

Patch by Matt Giuca <mgiuca@chromium.org>

5 years agoAdd some blank lines at the end of 3 files to remove the "no newlines at end of file...
John Abd-El-Malek [Tue, 20 May 2014 18:18:44 +0000]
Add some blank lines at the end of 3 files to remove the "no newlines at end of file" warning.

5 years agoAdd my @chromium account in the AUTHORS file.
John Abd-El-Malek [Tue, 20 May 2014 18:01:31 +0000]
Add my @chromium account in the AUTHORS file.

5 years agoRemove "using namespace agg" to make it clear which code is using agg, and also so...
John Abd-El-Malek [Tue, 20 May 2014 17:59:54 +0000]
Remove "using namespace agg" to make it clear which code is using agg, and also so we can turn compiler warnings into errors.

5 years agoFix warning on Mac.
John Abd-El-Malek [Tue, 20 May 2014 17:29:41 +0000]
Fix warning on Mac.

5 years agoRemove "using namespace v8" in header. This allows us to turn all warnings into error...
John Abd-El-Malek [Tue, 20 May 2014 16:52:29 +0000]
Remove "using namespace v8" in header. This allows us to turn all warnings into errors. It also makes it clearer to find usage of v8 in the library.

5 years agoRemove refernce to file that's not there in gyp.
John Abd-El-Malek [Tue, 20 May 2014 00:13:13 +0000]
Remove refernce to file that's not there in gyp.

5 years agoInitial commit.
John Abd-El-Malek [Sun, 18 May 2014 05:33:34 +0000]
Initial commit.

5 years agoInitial empty repository
Chase Phillips [Fri, 9 May 2014 21:48:50 +0000]
Initial empty repository