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 =3D true; } else if (val->unit =3D=3D Value::Function) { // There are two allowed functions: local() and format(). + // For both we expect a string argument ValueList *args =3D val->function->args; - if (args && args->size() =3D=3D 1) { + if (args && args->size() =3D=3D 1 && + (args->current()->unit =3D=3D CSSPrimitiveValue::CSS_STRIN= G || + args->current()->unit =3D=3D CSSPrimitiveValue::CSS_IDENT= )) { if (!strcasecmp(domString(val->function->name), "local(") = && !expectComma) { expectComma =3D true; allowFormat =3D false;