Summary: | ASTERISK-26711: func_enum: ENUM code wrong case | ||
Reporter: | Vitold (vit1251) | Labels: | patch |
Date Opened: | 2017-01-11 05:04:51.000-0600 | Date Closed: | 2020-03-09 10:01:37 |
Priority: | Trivial | Regression? | No |
Status: | Closed/Complete | Components: | Functions/func_enum |
Versions: | 14.2.1 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Debian | Attachments: | ( 0) 0001-enum-Handle-optional-NAPTR-regular-expression-flags.patch |
Description: | Source code main/enum.c:500
{code} delim = regexp[0]; delim2 = strchr(regexp + 1, delim); if ((delim2 == NULL) || (regexp[regexp_len - 1] != delim)) { /* is the second delimiter found, and is the end of the regexp a delimiter */ ast_log(LOG_WARNING, "Regex delimiter error (on \"%s\").\n", regexp); return -1; } else if (strchr((delim2 + 1), delim) == NULL) { /* if the second delimiter is found, make sure there is a third instance. this could be the end one instead of the middle */ ast_log(LOG_WARNING, "Regex delimiter error (on \"%s\").\n", regexp); return -1; } {code} Please trace your code with regexp: "!^.+$!sip:sip@sipnet.ru!i" Last regexp "i" make this regular expression parser incorrect. | ||
Comments: | By: Asterisk Team (asteriskteam) 2017-01-11 05:04:52.999-0600 Thanks for creating a report! The issue has entered the triage process. That means the issue will wait in this status until a Bug Marshal has an opportunity to review the issue. Once the issue has been reviewed you will receive comments regarding the next steps towards resolution. A good first step is for you to review the [Asterisk Issue Guidelines|https://wiki.asterisk.org/wiki/display/AST/Asterisk+Issue+Guidelines] if you haven't already. The guidelines detail what is expected from an Asterisk issue report. Then, if you are submitting a patch, please review the [Patch Contribution Process|https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process]. By: Sean Bright (seanbright) 2017-08-23 11:06:47.926-0500 [~vit1251], can you try the patch that I attached and let me know if that solves the issue for you? By: Friendly Automation (friendly-automation) 2020-03-09 10:01:38.849-0500 Change 13893 merged by George Joseph: enum.c: Add support for regular expression flag in NAPTR record [https://gerrit.asterisk.org/c/asterisk/+/13893|https://gerrit.asterisk.org/c/asterisk/+/13893] By: Friendly Automation (friendly-automation) 2020-03-09 10:03:21.624-0500 Change 13901 merged by George Joseph: enum.c: Add support for regular expression flag in NAPTR record [https://gerrit.asterisk.org/c/asterisk/+/13901|https://gerrit.asterisk.org/c/asterisk/+/13901] By: Friendly Automation (friendly-automation) 2020-03-09 10:03:42.060-0500 Change 13894 merged by George Joseph: enum.c: Add support for regular expression flag in NAPTR record [https://gerrit.asterisk.org/c/asterisk/+/13894|https://gerrit.asterisk.org/c/asterisk/+/13894] By: Friendly Automation (friendly-automation) 2020-03-09 10:04:01.439-0500 Change 13895 merged by George Joseph: enum.c: Add support for regular expression flag in NAPTR record [https://gerrit.asterisk.org/c/asterisk/+/13895|https://gerrit.asterisk.org/c/asterisk/+/13895] |