mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
完善非法url提示:#2129
This commit is contained in:
parent
f05a9501fa
commit
04422b31b6
@ -220,7 +220,7 @@ void splitUrl(const std::string &url, std::string &host, uint16_t &port) {
|
||||
checkHost(host);
|
||||
return;
|
||||
}
|
||||
CHECK(pos > 0, "invalid url:", port);
|
||||
CHECK(pos > 0, "invalid url:", url);
|
||||
CHECK(sscanf(url.data() + pos + 1, "%" SCNu16, &port) == 1, "parse port from url failed:", url);
|
||||
host = url.substr(0, pos);
|
||||
checkHost(host);
|
||||
|
Loading…
Reference in New Issue
Block a user