[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kdelibs/KDE/4.8] khtml/css: Fix some error checking problems in font src() descriptors
From: Maks Orlovich <maksim () kde ! org>
Date: 2012-02-06 12:20:33
Message-ID: 20120206122033.EC2F2A60A6 () git ! kde ! org
[Download RAW message or body]
Git commit a872c8a969a8bd3706253d6ba24088e4f07f3352 by Maks Orlovich.
Committed on 06/02/2012 at 13:08.
Pushed by orlovich into branch 'KDE/4.8'.
Fix some error checking problems in font src() descriptors
M +4 -1 khtml/css/cssparser.cpp
http://commits.kde.org/kdelibs/a872c8a969a8bd3706253d6ba24088e4f07f3352
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