cssparser: Fix cases where we could overrun the terminating 0
This commit is contained in:
		@ -875,16 +875,19 @@ _gtk_css_parser_resync_internal (GtkCssParser *parser,
 | 
			
		||||
      case '(':
 | 
			
		||||
        parser->data++;
 | 
			
		||||
        _gtk_css_parser_resync (parser, FALSE, ')');
 | 
			
		||||
        if (*parser->data)
 | 
			
		||||
          parser->data++;
 | 
			
		||||
        break;
 | 
			
		||||
      case '[':
 | 
			
		||||
        parser->data++;
 | 
			
		||||
        _gtk_css_parser_resync (parser, FALSE, ']');
 | 
			
		||||
        if (*parser->data)
 | 
			
		||||
          parser->data++;
 | 
			
		||||
        break;
 | 
			
		||||
      case '{':
 | 
			
		||||
        parser->data++;
 | 
			
		||||
        _gtk_css_parser_resync (parser, FALSE, '}');
 | 
			
		||||
        if (*parser->data)
 | 
			
		||||
          parser->data++;
 | 
			
		||||
        if (sync_at_semicolon || !terminator)
 | 
			
		||||
          {
 | 
			
		||||
@ -902,6 +905,8 @@ _gtk_css_parser_resync_internal (GtkCssParser *parser,
 | 
			
		||||
          }
 | 
			
		||||
        parser->data++;
 | 
			
		||||
        continue;
 | 
			
		||||
      case '\0':
 | 
			
		||||
        break;
 | 
			
		||||
      case '/':
 | 
			
		||||
      default:
 | 
			
		||||
        parser->data++;
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user