summaryrefslogtreecommitdiff
path: root/libavformat/rtmpproto.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-12 20:44:57 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-12 20:44:57 +0200
commitdc1c79be1bfc76839b1fd277a55e6baad4379498 (patch)
treed2c7f66e872b9bcb1b0816a31ba5b13deecd7e8b /libavformat/rtmpproto.c
parent2a622c2369e399907297465b14328b2389bb524c (diff)
parent65a80ee1ec854dc4e5d090fa5b2be9afeae312d3 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: avfilter: Log an error if avfilter fails to configure a link. avconv: support only native pthreads. rtmp: Fix a possible access to invalid memory location when the playpath is too short. Conflicts: ffmpeg.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtmpproto.c')
-rw-r--r--libavformat/rtmpproto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/rtmpproto.c b/libavformat/rtmpproto.c
index 6e53e9e4a9..5ac6151e4a 100644
--- a/libavformat/rtmpproto.c
+++ b/libavformat/rtmpproto.c
@@ -1141,11 +1141,11 @@ static int rtmp_open(URLContext *s, const char *uri, int flags)
goto fail;
}
- if (!strchr(fname, ':') &&
+ if (!strchr(fname, ':') && len >= 4 &&
(!strcmp(fname + len - 4, ".f4v") ||
!strcmp(fname + len - 4, ".mp4"))) {
memcpy(rt->playpath, "mp4:", 5);
- } else if (!strcmp(fname + len - 4, ".flv")) {
+ } else if (len >= 4 && !strcmp(fname + len - 4, ".flv")) {
fname[len - 4] = '\0';
} else {
rt->playpath[0] = 0;