Allocate m_pCompData when |m_nComponents| is updated.
authorBo Xu <bo_xu@foxitsoftware.com>
Wed, 3 Sep 2014 20:30:43 +0000 (13:30 -0700)
committerBo Xu <bo_xu@foxitsoftware.com>
Wed, 3 Sep 2014 20:30:43 +0000 (13:30 -0700)
commitbb3c1a29348511afdc140cccdf5b1f5d0292794c
tree6af3eb03b3928e9bb12033ad9a87565ce81bd7d9
parent5f8a503b2a8701c5c4f6e0aadf334affcdd03d28
Allocate m_pCompData when |m_nComponents| is updated.

When |m_nComponents| is changed from loading stream information,
previously allocated memory that depends on |m_nComponents| needes to be freed
and allocated again to enforce memory size consistency.

BUG=409695
R=tsepez@chromium.org

Review URL: https://codereview.chromium.org/528163002
core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
core/src/fpdfapi/fpdf_render/render_int.h