rtspdec: use av_strlcpy for writing into fixed size buffer
authorJanne Grunau <janne-libav@jannau.net>
Tue, 9 Oct 2012 19:03:40 +0000 (21:03 +0200)
committerJanne Grunau <janne-libav@jannau.net>
Tue, 9 Oct 2012 19:05:15 +0000 (21:05 +0200)
Fixes CID231347.

libavformat/rtspdec.c

index a891837..7476c45 100644 (file)
@@ -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);
         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));
         }
     }
 
         }
     }