mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
avformat/icecast: reject CR/LF in metadata header values
Reported by Franciszek Kalinowski (isec.pl / striga.ai) and Bartosz Smigielski.
This commit is contained in:
committed by
Marvin Scholz
co-authored by
Marvin Scholz
parent
87439ed619
commit
99e1ecca36
@@ -70,8 +70,14 @@ static const AVOption options[] = {
|
||||
|
||||
static void cat_header(AVBPrint *bp, const char key[], const char value[])
|
||||
{
|
||||
if (NOT_EMPTY(value))
|
||||
if (NOT_EMPTY(value)) {
|
||||
if (strpbrk(value, "\r\n")) {
|
||||
av_log(NULL, AV_LOG_ERROR,
|
||||
"Refusing to send '%s' header: value contains CR/LF\n", key);
|
||||
return;
|
||||
}
|
||||
av_bprintf(bp, "%s: %s\r\n", key, value);
|
||||
}
|
||||
}
|
||||
|
||||
static int icecast_close(URLContext *h)
|
||||
|
||||
Reference in New Issue
Block a user