summaryrefslogtreecommitdiff
path: root/xfa/fde/css/fde_cssdatatable.h
diff options
context:
space:
mode:
authornpm <npm@chromium.org>2016-11-28 12:49:29 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-28 12:49:29 -0800
commit239915200225fea4c5a02e9630044ef13fccb66d (patch)
treefe761ea15a77754bae4cb813e3f33392a523e3c2 /xfa/fde/css/fde_cssdatatable.h
parenteb9625c04876c45862fb30e48a4fd6d5998db0e9 (diff)
downloadpdfium-239915200225fea4c5a02e9630044ef13fccb66d.tar.xz
Fix crash in CFDE_CSSSyntaxParser when parsing empty url
When parsing "url('')", Subtract() should be called to correctly set m_iDatLen. But iLength will be 0 because there is no url. So I changed the ASSERT. Also replaced some non-const refs with pointers to make the code more readable. BUG=659509 Review-Url: https://codereview.chromium.org/2535663003
Diffstat (limited to 'xfa/fde/css/fde_cssdatatable.h')
-rw-r--r--xfa/fde/css/fde_cssdatatable.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/xfa/fde/css/fde_cssdatatable.h b/xfa/fde/css/fde_cssdatatable.h
index 660895cdb0..260432d9fc 100644
--- a/xfa/fde/css/fde_cssdatatable.h
+++ b/xfa/fde/css/fde_cssdatatable.h
@@ -161,14 +161,13 @@ bool FDE_ParseCSSNumber(const FX_WCHAR* pszValue,
FDE_CSSPRIMITIVETYPE& eUnit);
bool FDE_ParseCSSString(const FX_WCHAR* pszValue,
int32_t iValueLen,
- int32_t& iOffset,
- int32_t& iLength);
+ int32_t* iOffset,
+ int32_t* iLength);
bool FDE_ParseCSSColor(const FX_WCHAR* pszValue,
int32_t iValueLen,
FX_ARGB& dwColor);
bool FDE_ParseCSSURI(const FX_WCHAR* pszValue,
- int32_t iValueLen,
- int32_t& iOffset,
- int32_t& iLength);
+ int32_t* iOffset,
+ int32_t* iLength);
#endif // XFA_FDE_CSS_FDE_CSSDATATABLE_H_