diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-05-08 18:19:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-05-08 18:19:38 +0200 |
commit | 0c2a6dabced53b4df57aedf47f0c1b8233035fed (patch) | |
tree | 2acf8d507279fd98faab15e556610483c557db1a /libavformat/rtmpproto.c | |
parent | aff352be6339d9a3512bd5c1b65772b36c5204ee (diff) | |
download | ffmpeg-0c2a6dabced53b4df57aedf47f0c1b8233035fed.tar.gz |
avformat/rtmpproto: add FFMIN() to av_strlcpy()
Suggested-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r-- | libavformat/rtmpproto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c index c8544efc8e..2883bb04f6 100644 --- a/libavformat/rtmpproto.c +++ b/libavformat/rtmpproto.c @@ -2482,12 +2482,12 @@ reconnect: if (qmark && strstr(qmark, "slist=")) { char* amp; // After slist we have the playpath, before the params, the app - av_strlcpy(rt->app, path + 1, qmark - path); + av_strlcpy(rt->app, path + 1, FFMIN(qmark - path, APP_MAX_LENGTH)); fname = strstr(path, "slist=") + 6; // Strip any further query parameters from fname amp = strchr(fname, '&'); if (amp) { - av_strlcpy(fname_buffer, fname, amp - fname + 1); + av_strlcpy(fname_buffer, fname, FFMIN(amp - fname + 1, sizeof(fname_buffer))); fname = fname_buffer; } } else if (!strncmp(path, "/ondemand/", 10)) { |