1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Fix #834, crash for TS context corrupt. 2.0.235

This commit is contained in:
winlin 2017-04-09 18:45:42 +08:00
parent 7d1a91ca7d
commit b11ddc7f41
7 changed files with 31 additions and 2 deletions

View file

@ -481,6 +481,14 @@ int SrsRtmpConn::stream_service_cycle()
return ret;
}
srs_info("security check ok");
// Never allow the empty stream name, for HLS may write to a file with empty name.
// @see https://github.com/ossrs/srs/issues/834
if (req->stream.empty()) {
ret = ERROR_RTMP_STREAM_NAME_EMPTY;
srs_error("RTMP: Empty stream name not allowed, ret=%d", ret);
return ret;
}
// client is identified, set the timeout to service timeout.
rtmp->set_recv_timeout(SRS_CONSTS_RTMP_RECV_TIMEOUT_US);