summaryrefslogtreecommitdiff
path: root/core/src/fpdftext
diff options
context:
space:
mode:
authorBo Xu <bo_xu@foxitsoftware.com>2014-08-31 15:23:46 -0700
committerBo Xu <bo_xu@foxitsoftware.com>2014-08-31 15:23:46 -0700
commit9f810e7216c2dbb1a1ab090f1bee4207ecd871c0 (patch)
treee46c165bfbb041153ebc3cddfd20b39769aea826 /core/src/fpdftext
parentd0c36505eebd0a755f77f98676db0b5bad2f2496 (diff)
downloadpdfium-9f810e7216c2dbb1a1ab090f1bee4207ecd871c0.tar.xz
Remove the GetValidBpc check in application callers and move it to where m_bpc is assigned.
The problem of using GetValidBpc() in each function call is it could result in mismatch as seen in this case: in ContinueToLoadMask(), m_bpc is re-assigned to 1 if m_bImageMask==1 regardless of the value from GetValidBpc(). This will result in mismatch if another function use the value from GetValidBpc(). The solution could be checking m_bImageMask in another function to make sure m_bpc is consistent, but that makes the code too cumbersome. Also, we have to bring and are bringing in more and more GetValidBpc check, and this will continue with other buggy documents. So better to fix it now. The original rational to use GetValidBpc() in where m_bpc is used is to respect the "raw" data from parsing. However, if it will be ignored anyway and using value from GetValidBpc(), we'd better correct it at the very beginning. BUG=408541 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/518443002
Diffstat (limited to 'core/src/fpdftext')
0 files changed, 0 insertions, 0 deletions