[FFmpeg-cvslog] rtspdec: use av_strlcpy for writing into fixed size buffer

Janne Grunau git at videolan.org
Wed Oct 10 14:10:44 CEST 2012


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Tue Oct  9 21:03:40 2012 +0200| [d5ef9354ce014be28748f4624e969e96fd1f5ff5] | committer: Janne Grunau

rtspdec: use av_strlcpy for writing into fixed size buffer

Fixes CID231347.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5ef9354ce014be28748f4624e969e96fd1f5ff5
---

 libavformat/rtspdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index a891837..7476c45 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -436,7 +436,7 @@ static inline int parse_command_line(AVFormatContext *s, const char *line,
         if (*methodcode == ANNOUNCE) {
             av_log(s, AV_LOG_INFO,
                    "Updating control URI to %s\n", uri);
-            strcpy(rt->control_uri, uri);
+            av_strlcpy(rt->control_uri, uri, sizeof(rt->control_uri));
         }
     }
 



More information about the ffmpeg-cvslog mailing list