Mercurial > mplayer.hg
changeset 29351:d58878f243ea
Replace incorrect use of strncpy by av_strlcpy.
Only a real issue if inet_ntoa can actually return a string of more than 255 bytes.
author | reimar |
---|---|
date | Fri, 26 Jun 2009 13:54:22 +0000 |
parents | a5c49ea5059a |
children | 1f7497265ab6 |
files | stream/tcp.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/stream/tcp.c Fri Jun 26 13:41:01 2009 +0000 +++ b/stream/tcp.c Fri Jun 26 13:54:22 2009 +0000 @@ -33,6 +33,7 @@ #include "network.h" #include "stream.h" #include "tcp.h" +#include "libavutil/avstring.h" /* IPv6 options */ int network_prefer_ipv4 = 0; @@ -163,7 +164,7 @@ } #if HAVE_INET_ATON || defined(HAVE_WINSOCK2_H) - strncpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); + av_strlcpy( buf, inet_ntoa( *((struct in_addr*)our_s_addr) ), 255); #else inet_ntop(af, our_s_addr, buf, 255); #endif