summaryrefslogtreecommitdiff
path: root/src/parse/properties/utils.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-05-27 14:52:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-05-27 14:52:32 +0000
commit4c78574365930320727d5aaa43a59fe07c40b5d1 (patch)
treecb45b00ad6009c2b04bd28136b65f44bf980cf15 /src/parse/properties/utils.c
parent01c57ac28efd4c96b696552027099b2b92e309de (diff)
downloadlibcss-4c78574365930320727d5aaa43a59fe07c40b5d1.tar.gz
libcss-4c78574365930320727d5aaa43a59fe07c40b5d1.tar.bz2
Avoid dereferencing NULL pointer
svn path=/trunk/libcss/; revision=7584
Diffstat (limited to 'src/parse/properties/utils.c')
-rw-r--r--src/parse/properties/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/parse/properties/utils.c b/src/parse/properties/utils.c
index 4fb1fca..382798c 100644
--- a/src/parse/properties/utils.c
+++ b/src/parse/properties/utils.c
@@ -59,7 +59,8 @@ css_error parse_colour_specifier(css_language *c,
token->type != CSS_TOKEN_HASH &&
token->type != CSS_TOKEN_FUNCTION)) {
if (c->sheet->quirks_allowed == false ||
- (token->type != CSS_TOKEN_NUMBER &&
+ (token != NULL &&
+ token->type != CSS_TOKEN_NUMBER &&
token->type != CSS_TOKEN_DIMENSION))
return CSS_INVALID;
}