mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1229, fix the security risk in logger. 3.0.69
This commit is contained in:
parent
ad70589347
commit
78da67e8d1
5 changed files with 36 additions and 4 deletions
|
@ -255,6 +255,12 @@ bool srs_log_header(char* buffer, int size, bool utc, bool dangerous, const char
|
|||
level, getpid(), cid);
|
||||
}
|
||||
}
|
||||
|
||||
// Exceed the size, ignore this log.
|
||||
// Check size to avoid security issue https://github.com/ossrs/srs/issues/1229
|
||||
if (written >= size) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (written == -1) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue