From f15b58ab9c9f635ba829753251c22b3da4683b00 Mon Sep 17 00:00:00 2001 From: beck <> Date: Sat, 19 Apr 2014 00:41:38 +0000 Subject: use intrinsic strlcpy and strlcat everywhere so we only have one set of funcitons to check for incorrect use. keep BUF_strlcpy and BUF_strlcat for API comptibility only. ok tedu@ --- src/lib/libcrypto/bio/b_dump.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib/libcrypto/bio/b_dump.c') diff --git a/src/lib/libcrypto/bio/b_dump.c b/src/lib/libcrypto/bio/b_dump.c index ff75069df8..61c9fe20a3 100644 --- a/src/lib/libcrypto/bio/b_dump.c +++ b/src/lib/libcrypto/bio/b_dump.c @@ -107,29 +107,29 @@ BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u), rows++; for (i = 0; i < rows; i++) { buf[0] = '\0'; /* start with empty string */ - BUF_strlcpy(buf, str, sizeof buf); + strlcpy(buf, str, sizeof buf); (void) snprintf(tmp, sizeof tmp, "%04x - ", i*dump_width); - BUF_strlcat(buf, tmp, sizeof buf); + strlcat(buf, tmp, sizeof buf); for (j = 0; j < dump_width; j++) { if (((i*dump_width) + j) >= len) { - BUF_strlcat(buf, " ", sizeof buf); + strlcat(buf, " ", sizeof buf); } else { ch = ((unsigned char)*(s + i*dump_width + j)) & 0xff; (void) snprintf(tmp, sizeof tmp, "%02x%c", ch, j == 7 ? '-' : ' '); - BUF_strlcat(buf, tmp, sizeof buf); + strlcat(buf, tmp, sizeof buf); } } - BUF_strlcat(buf, " ", sizeof buf); + strlcat(buf, " ", sizeof buf); for (j = 0; j < dump_width; j++) { if (((i*dump_width) + j) >= len) break; ch = ((unsigned char)*(s + i * dump_width + j)) & 0xff; (void) snprintf(tmp, sizeof tmp, "%c", ((ch >= ' ') && (ch <= '~')) ? ch : '.'); - BUF_strlcat(buf, tmp, sizeof buf); + strlcat(buf, tmp, sizeof buf); } - BUF_strlcat(buf, "\n", sizeof buf); + strlcat(buf, "\n", sizeof buf); /* if this is the last call then update the ddt_dump thing so * that we will move the selection point in the debug window */ -- cgit v1.2.3-55-g6feb