~ubuntu-branches/debian/stretch/haproxy/stretch

« back to all changes in this revision

Viewing changes to src/pattern.c

  • Committer: Package Import Robot
  • Author(s): Vincent Bernat
  • Date: 2015-05-02 16:38:28 UTC
  • mfrom: (1.3.13)
  • Revision ID: package-import@ubuntu.com-20150502163828-lph2toctaqrw41x5
Tags: 1.5.12-1
* New upstream stable release including the following fixes:
  - BUG/MAJOR: http: don't read past buffer's end in http_replace_value
  - BUG/MAJOR: http: prevent risk of reading past end with balance
               url_param
  - BUG/MEDIUM: Do not consider an agent check as failed on L7 error
  - BUG/MEDIUM: patern: some entries are not deleted with case
                insensitive match
  - BUG/MEDIUM: buffer: one byte miss in buffer free space check
  - BUG/MEDIUM: http: thefunction "(req|res)-replace-value" doesn't
                respect the HTTP syntax
  - BUG/MEDIUM: peers: correctly configure the client timeout
  - BUG/MEDIUM: http: hdr_cnt would not count any header when called
                without name
  - BUG/MEDIUM: listener: don't report an error when resuming unbound
                listeners
  - BUG/MEDIUM: init: don't limit cpu-map to the first 32 processes only
  - BUG/MEDIUM: stream-int: always reset si->ops when si->end is
                nullified
  - BUG/MEDIUM: http: remove content-length from chunked messages
  - BUG/MEDIUM: http: do not restrict parsing of transfer-encoding to
                HTTP/1.1
  - BUG/MEDIUM: http: incorrect transfer-coding in the request is a bad
                request
  - BUG/MEDIUM: http: remove content-length form responses with bad
                transfer-encoding
  - BUG/MEDIUM: http: wait for the exact amount of body bytes in
                wait_for_request_body

Show diffs side-by-side

added added

removed removed

Lines of Context:
989
989
 
990
990
        /* allocate pattern */
991
991
        patl = calloc(1, sizeof(*patl));
992
 
        if (!patl)
 
992
        if (!patl) {
 
993
                memprintf(err, "out of memory while indexing pattern");
993
994
                return 0;
 
995
        }
994
996
 
995
997
        /* duplicate pattern */
996
998
        memcpy(&patl->pat, pat, sizeof(*pat));
1306
1308
        struct ebmb_node *node, *next_node;
1307
1309
        struct pattern_tree *elt;
1308
1310
 
 
1311
        /* If the flag PAT_F_IGNORE_CASE is set, we cannot use trees */
 
1312
        if (expr->mflags & PAT_MF_IGNORE_CASE)
 
1313
                return pat_del_list_ptr(expr, ref);
 
1314
 
1309
1315
        /* browse each node of the tree. */
1310
1316
        for (node = ebmb_first(&expr->pattern_tree), next_node = node ? ebmb_next(node) : NULL;
1311
1317
             node;