BUG/MEDIUM: pattern: Segfault in binary parser
authorThierry FOURNIER <tfournier@exceliance.fr>
Tue, 21 Jan 2014 09:59:24 +0000 (10:59 +0100)
committerWilly Tarreau <w@1wt.eu>
Tue, 21 Jan 2014 21:14:21 +0000 (22:14 +0100)
commit46ceb01c2492954e9111f2e8af1ce1534be04938
treea0c055ae022e3f84d30070a3ed46712cfedcf76e
parent46be2e50396be22c54e781fd5accdbee1ef70115
BUG/MEDIUM: pattern: Segfault in binary parser

The functions pat_parse_* must return 0 if fail and the number of
elements eated from **text if not fail. The function pat_parse_bin()
returns 0 or the length parsed. This causes a segfault. I just apply the
double operator "!" on the result of the function pat_parse_bin() and
the return value value match the expected value.
src/pattern.c