mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
avformat/http: Fix off by 1 error
Fixes: out of array access
Fixes: zeropath/off-by-one-one-byte
Found-by: Joshua Rogers <joshua@joshua.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b518c027a0)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -1849,7 +1849,7 @@ static int store_icy(URLContext *h, int size)
|
||||
ret = http_read_stream_all(h, data, len);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
data[len + 1] = 0;
|
||||
data[len] = 0;
|
||||
if ((ret = av_opt_set(s, "icy_metadata_packet", data, 0)) < 0)
|
||||
return ret;
|
||||
update_metadata(h, data);
|
||||
|
||||
Reference in New Issue
Block a user