[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/KDE/4.7] khtml/css: Fix some error checking problems in font src() descriptors
From: Maks Orlovich <maksim () kde ! org>
Date: 2012-02-08 13:16:44
Message-ID: 20120208131644.EAE8FA60A6 () git ! kde ! org
[Download RAW message or body]
Git commit 3288e0fd78b964676254db5e9df6d152fce519a9 by Maks Orlovich.
Committed on 06/02/2012 at 13:08.
Pushed by orlovich into branch 'KDE/4.7'.
Fix some error checking problems in font src() descriptors
M +4 -1 khtml/css/cssparser.cpp
http://commits.kde.org/kdelibs/3288e0fd78b964676254db5e9df6d152fce519a9
diff --git a/khtml/css/cssparser.cpp b/khtml/css/cssparser.cpp
index 7559db3..c7472ba 100644
--- a/khtml/css/cssparser.cpp
+++ b/khtml/css/cssparser.cpp
@@ -2275,8 +2275,11 @@ bool CSSParser::parseFontFaceSrc()
expectComma = true;
} else if (val->unit == Value::Function) {
// There are two allowed functions: local() and format().
+ // For both we expect a string argument
ValueList *args = val->function->args;
- if (args && args->size() == 1) {
+ if (args && args->size() == 1 &&
+ (args->current()->unit == CSSPrimitiveValue::CSS_STRING ||
+ args->current()->unit == CSSPrimitiveValue::CSS_IDENT)) {
if (!strcasecmp(domString(val->function->name), "local(") && !expectComma) {
expectComma = true;
allowFormat = false;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic