hackers-painters / katana-parser

A CSS parsing library in pure C99
http://hackers-painters.github.io/katana-parser
MIT License
180 stars 40 forks source link

Crash on parsing '@supports' #19

Open vs-savchenko opened 5 years ago

vs-savchenko commented 5 years ago

Attempt to parse a string "@supports (transform-origin: 5% 5%) {}" will rise EXC_BAD_ACCESS exception inside 'katana_add_rule'. Function 'katana_add_rule' is called from here:

katana.tab.c:2252

  case 36:

    {
        if ((yyvsp[-1].rule))
            katana_add_rule(parser, (yyvsp[-1].rule));
    }

    break;

(yyvsp[-1].rule) contains invalid value.