Changeset e6a4dd5 for filter.c


Ignore:
Timestamp:
Apr 2, 2009, 1:23:14 AM (12 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
3071c69
Parents:
d9bfc82
Message:
Propagate regex compile failures out of filter creation.

Make calls to owl_filter_init_fromstring fail if the filter includes an
illegal regex (e.g. an initial *), by having owl_filterelement_create_re
return an error code which propagates up.

This fixes an issue where a command like 'unpunt class *' would segfault
because it succeeds in creating the invalid filter, but then fails to
print it successfully.

fixes: #70
File:
1 edited

Legend:

Unmodified
Added
Removed
  • filter.c

    rf34dd65 re6a4dd5  
    9595      owl_filterelement_create_perl(fe, *(argv+1));
    9696    } else {
    97       owl_filterelement_create_re(fe, *argv, *(argv+1));
     97      if(owl_filterelement_create_re(fe, *argv, *(argv+1))) {
     98        goto err;
     99      }
    98100    }
    99101    i += 2;
Note: See TracChangeset for help on using the changeset viewer.