summaryrefslogtreecommitdiffstats
path: root/crypto/bio/b_sock.c
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2003-12-27 14:40:17 +0000
committerRichard Levitte <levitte@openssl.org>2003-12-27 14:40:17 +0000
commitd420ac2c7d4ba9d99ff2c257a3ad71ecc6d876e2 (patch)
tree84414c7d794c6286588d2042f060036378311348 /crypto/bio/b_sock.c
parentb79aa47a0c8478bea62fc2bb55f99e0be172da3d (diff)
Use BUF_strlcpy() instead of strcpy().
Use BUF_strlcat() instead of strcat(). Use BIO_snprintf() instead of sprintf(). In some cases, keep better track of buffer lengths. This is part of a large change submitted by Markus Friedl <markus@openbsd.org>
Diffstat (limited to 'crypto/bio/b_sock.c')
-rw-r--r--crypto/bio/b_sock.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/crypto/bio/b_sock.c b/crypto/bio/b_sock.c
index d619bcf995..268517fdc3 100644
--- a/crypto/bio/b_sock.c
+++ b/crypto/bio/b_sock.c
@@ -740,12 +740,12 @@ int BIO_accept(int sock, char **addr)
}
*addr=p;
}
- sprintf(*addr,"%d.%d.%d.%d:%d",
- (unsigned char)(l>>24L)&0xff,
- (unsigned char)(l>>16L)&0xff,
- (unsigned char)(l>> 8L)&0xff,
- (unsigned char)(l )&0xff,
- port);
+ BIO_snprintf(*addr,24,"%d.%d.%d.%d:%d",
+ (unsigned char)(l>>24L)&0xff,
+ (unsigned char)(l>>16L)&0xff,
+ (unsigned char)(l>> 8L)&0xff,
+ (unsigned char)(l )&0xff,
+ port);
end:
return(ret);
}