changeset 642:2b8a9d2bdf6e

check for EOF in Css_next_token()
author Johannes Hofmann <Johannes.Hofmann@gmx.de>
date Tue, 02 Dec 2008 21:44:13 +0100
parents d48e197475dd
children eb0279297fde
files src/cssparser.cc
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/cssparser.cc	Tue Dec 02 19:14:38 2008 +0100
+++ b/src/cssparser.cc	Tue Dec 02 21:44:13 2008 +0100
@@ -405,7 +405,7 @@
          if (d == '*') {
             c = Css_getc(parser);
             d = Css_getc(parser);
-            while (c != '*' || d != '/') {
+            while (d != EOF && (c != '*' || d != '/')) {
                c = d;
                d = Css_getc(parser);
             }
@@ -473,7 +473,7 @@
       c = Css_getc(parser);
       escaped = false;
 
-      while (escaped || c != c1) {
+      while (c != EOF && (escaped || c != c1)) {
          if (c == '\\') {
             escaped = true;
             d = Css_getc(parser);