Deny loading of streamnames > 100 characters.
This commit is contained in:
parent
cfc6d9d6d3
commit
fe08c8f5c7
1 changed files with 4 additions and 0 deletions
|
@ -71,6 +71,10 @@ void Util::sanitizeName(std::string & streamname) {
|
||||||
|
|
||||||
/// Starts a process for a VoD stream.
|
/// Starts a process for a VoD stream.
|
||||||
bool Util::startInput(std::string streamname, std::string filename, bool forkFirst) {
|
bool Util::startInput(std::string streamname, std::string filename, bool forkFirst) {
|
||||||
|
if (streamname.size() > 100){
|
||||||
|
FAIL_MSG("Stream opening denied: %s is longer than 100 characters (%lu).", streamname.c_str(), streamname.size());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
IPC::sharedPage mistConfOut("!mistConfig", DEFAULT_CONF_PAGE_SIZE);
|
IPC::sharedPage mistConfOut("!mistConfig", DEFAULT_CONF_PAGE_SIZE);
|
||||||
IPC::semaphore configLock("!mistConfLock", O_CREAT | O_RDWR, ACCESSPERMS, 1);
|
IPC::semaphore configLock("!mistConfLock", O_CREAT | O_RDWR, ACCESSPERMS, 1);
|
||||||
configLock.wait();
|
configLock.wait();
|
||||||
|
|
Loading…
Add table
Reference in a new issue