mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
strings.c: Improve numeric detection in ast_strings_match()
.
Essentially, we were treating 1234x1234 and 1234x5678 as 'equal'
because we were able to convert the prefix of each of these strings to
the same number.
Resolves: #1028
(cherry picked from commit 813b774cc1
)
This commit is contained in:
committed by
Asterisk Development Team
parent
24c077f1fb
commit
8b62a1c8a9
@@ -717,6 +717,9 @@ AST_TEST_DEFINE(strings_match)
|
||||
ast_test_validate(test, !ast_strings_match(NULL, NULL, "abc"));
|
||||
ast_test_validate(test, !ast_strings_match(NULL, NULL, NULL));
|
||||
|
||||
/* See https://github.com/asterisk/asterisk/issues/1028 */
|
||||
ast_test_validate(test, !ast_strings_match("123456789c1", NULL, "123456789c2"));
|
||||
|
||||
return AST_TEST_PASS;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user