avformat/rtmpproto: add FFMIN() to av_strlcpy()

Suggested-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-05-08 18:19:38 +02:00
parent aff352be63
commit 0c2a6dabce
1 changed files with 2 additions and 2 deletions

View File

@ -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)) {