[FFmpeg-soc] [soc]: r4509 - rtmp/rtmpproto.c

kostya subversion at mplayerhq.hu
Tue Jun 23 20:40:10 CEST 2009


Author: kostya
Date: Tue Jun 23 20:40:10 2009
New Revision: 4509

Log:
Use av_strlcpy() instead of strncpy()

Modified:
   rtmp/rtmpproto.c

Modified: rtmp/rtmpproto.c
==============================================================================
--- rtmp/rtmpproto.c	Tue Jun 23 20:23:01 2009	(r4508)
+++ rtmp/rtmpproto.c	Tue Jun 23 20:40:10 2009	(r4509)
@@ -514,12 +514,10 @@ static int rtmp_open(URLContext *s, cons
                 fname = strchr(p + 1, '/');
                 if (!fname) {
                     fname = p + 1;
-                    strncpy(app, path + 1, p - path - 1);
-                    app[p - path - 1] = '\0';
+                    av_strlcpy(app, path + 1, p - path);
                 } else {
                     fname++;
-                    strncpy(app, path + 1, fname - path - 2);
-                    app[fname - path - 2] = '\0';
+                    av_strlcpy(app, path + 1, fname - path - 1);
                 }
             }
         }


More information about the FFmpeg-soc mailing list