Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: xfa/fde/css/fde_cssdeclaration.cpp

Issue 2535663003: Fix crash in CFDE_CSSSyntaxParser when parsing empty url (Closed)
Patch Set: Comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fde/css/fde_cssdatatable.cpp ('k') | xfa/fde/css/fde_csssyntax.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fde/css/fde_cssdeclaration.cpp
diff --git a/xfa/fde/css/fde_cssdeclaration.cpp b/xfa/fde/css/fde_cssdeclaration.cpp
index 2196d6bd91cf3233469ed22c71565931b52cd37e..f6af9000429ad37a531c16897a50bf0aa9fcb9d2 100644
--- a/xfa/fde/css/fde_cssdeclaration.cpp
+++ b/xfa/fde/css/fde_cssdeclaration.cpp
@@ -301,33 +301,35 @@ IFDE_CSSValue* CFDE_CSSDeclaration::ParseColor(const FDE_CSSPROPERTYARGS* pArgs,
}
return FXTARGET_NewWith(pArgs->pStaticStore) CFDE_CSSPrimitiveValue(dwColor);
}
+
IFDE_CSSValue* CFDE_CSSDeclaration::ParseURI(const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen) {
int32_t iOffset;
- if (!FDE_ParseCSSURI(pszValue, iValueLen, iOffset, iValueLen)) {
+ if (!FDE_ParseCSSURI(pszValue, &iOffset, &iValueLen))
return nullptr;
- }
- if (iValueLen <= 0) {
+
+ if (iValueLen <= 0)
return nullptr;
- }
+
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue
? FXTARGET_NewWith(pArgs->pStaticStore)
CFDE_CSSPrimitiveValue(FDE_CSSPRIMITIVETYPE_URI, pszValue)
: nullptr;
}
+
IFDE_CSSValue* CFDE_CSSDeclaration::ParseString(
const FDE_CSSPROPERTYARGS* pArgs,
const FX_WCHAR* pszValue,
int32_t iValueLen) {
int32_t iOffset;
- if (!FDE_ParseCSSString(pszValue, iValueLen, iOffset, iValueLen)) {
+ if (!FDE_ParseCSSString(pszValue, iValueLen, &iOffset, &iValueLen))
return nullptr;
- }
- if (iValueLen <= 0) {
+
+ if (iValueLen <= 0)
return nullptr;
- }
+
pszValue = CopyToLocal(pArgs, pszValue + iOffset, iValueLen);
return pszValue
? FXTARGET_NewWith(pArgs->pStaticStore)
« no previous file with comments | « xfa/fde/css/fde_cssdatatable.cpp ('k') | xfa/fde/css/fde_csssyntax.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698