aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-02 14:47:16 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-18 16:05:23 +0200
commit6af15d2d896dc4a909a1d80d70d227f96730f3a2 (patch)
treefab93aa09695753e6b473920abe1cf66f1b0066d /libavformat/utils.c
parentcc6eec316e2a49c255f068821c6de497b2e3f1c1 (diff)
downloadffmpeg-6af15d2d896dc4a909a1d80d70d227f96730f3a2.tar.gz
avformat/options: log filename on open
The loglevel is choosen so that the main filename and any images of multi image sequences are shown only at debug level to avoid clutter. This makes exploits in playlists more visible. As they would show accesses to private/sensitive files Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 53e0d5d7247548743e13c59c35e59fc2161e9582) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d71aca851b..46dc5109d1 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -497,6 +497,7 @@ int avformat_open_input(AVFormatContext **ps, const char *filename,
if ((ret = av_opt_set_dict(s, &tmp)) < 0)
goto fail;
+ av_strlcpy(s->filename, filename ? filename : "", sizeof(s->filename));
if ((ret = init_input(s, filename, &tmp)) < 0)
goto fail;
s->probe_score = ret;
@@ -534,7 +535,6 @@ int avformat_open_input(AVFormatContext **ps, const char *filename,
}
s->duration = s->start_time = AV_NOPTS_VALUE;
- av_strlcpy(s->filename, filename ? filename : "", sizeof(s->filename));
/* Allocate private data. */
if (s->iformat->priv_data_size > 0) {