mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
[core] Fix segments count check in clean_uri(). Add unit-test. (#3032)
This commit is contained in:
committed by
GitHub
parent
08c3fffa7c
commit
325bb3a606
+2
-1
@@ -4270,7 +4270,8 @@ switch_status_t clean_uri(char *uri)
|
||||
|
||||
argc = switch_separate_string(uri, '/', argv, sizeof(argv) / sizeof(argv[0]));
|
||||
|
||||
if (argc == sizeof(argv)) { /* too deep */
|
||||
/* Intentionally using == instead of > because this way we would know that the url was fully parsed for sure */
|
||||
if (argc == (sizeof(argv) / sizeof(argv[0]))) { /* too deep */
|
||||
return SWITCH_STATUS_FALSE;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user