[libav-commits] rtspdec: use av_strlcpy for writing into fixed size buffer

Janne Grunau git at libav.org
Tue Oct 9 22:13:52 CEST 2012


Module: libav
Branch: master
Commit: d5ef9354ce014be28748f4624e969e96fd1f5ff5

Author:    Janne Grunau <janne-libav at jannau.net>
Committer: Janne Grunau <janne-libav at jannau.net>
Date:      Tue Oct  9 21:03:40 2012 +0200

rtspdec: use av_strlcpy for writing into fixed size buffer

Fixes CID231347.

---

 libavformat/rtspdec.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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 libav-commits mailing list