diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-06-26 13:54:22 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2009-06-26 13:54:22 +0000 |
commit | 437efdc855d2ccf83d482f40a90041609e7ac373 (patch) | |
tree | b95e821aec3e27bd43c36acbcb19b1021715c2c2 /stream/tcp.c | |
parent | eeb99c1c1413bb1d51d84ce9de4d21c0dec6fda2 (diff) | |
download | mpv-437efdc855d2ccf83d482f40a90041609e7ac373.tar.bz2 mpv-437efdc855d2ccf83d482f40a90041609e7ac373.tar.xz |
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.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29393 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tcp.c')
-rw-r--r-- | stream/tcp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stream/tcp.c b/stream/tcp.c index b299e9d66f..ff4db78847 100644 --- a/stream/tcp.c +++ b/stream/tcp.c @@ -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 @@ connect2Server_with_af(char *host, int port, int af,int verb) { } #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 |