diff options
author | 2014-04-19 00:41:37 +0000 | |
---|---|---|
committer | 2014-04-19 00:41:37 +0000 | |
commit | 143cedbbb5931c72fe516e48392a9203fe83567d (patch) | |
tree | a36bf02143b29b597cd99a04fc086818b33930f2 /lib/libssl/src/crypto/ui/ui_lib.c | |
parent | OpenSSH 6.5 and 6.6 have a bug that causes ~0.2% of connections (diff) | |
download | wireguard-openbsd-143cedbbb5931c72fe516e48392a9203fe83567d.tar.xz wireguard-openbsd-143cedbbb5931c72fe516e48392a9203fe83567d.zip |
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@
Diffstat (limited to 'lib/libssl/src/crypto/ui/ui_lib.c')
-rw-r--r-- | lib/libssl/src/crypto/ui/ui_lib.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/libssl/src/crypto/ui/ui_lib.c b/lib/libssl/src/crypto/ui/ui_lib.c index fc03d9b7d4c..58e4c5d7221 100644 --- a/lib/libssl/src/crypto/ui/ui_lib.c +++ b/lib/libssl/src/crypto/ui/ui_lib.c @@ -409,13 +409,13 @@ UI_construct_prompt(UI *ui, const char *object_desc, const char *object_name) len += sizeof(prompt3) - 1; prompt = (char *)malloc(len + 1); - BUF_strlcpy(prompt, prompt1, len + 1); - BUF_strlcat(prompt, object_desc, len + 1); + strlcpy(prompt, prompt1, len + 1); + strlcat(prompt, object_desc, len + 1); if (object_name) { - BUF_strlcat(prompt, prompt2, len + 1); - BUF_strlcat(prompt, object_name, len + 1); + strlcat(prompt, prompt2, len + 1); + strlcat(prompt, object_name, len + 1); } - BUF_strlcat(prompt, prompt3, len + 1); + strlcat(prompt, prompt3, len + 1); } return prompt; } @@ -869,7 +869,7 @@ UI_set_result(UI *ui, UI_STRING *uis, const char *result) UIerr(UI_F_UI_SET_RESULT, UI_R_NO_RESULT_BUFFER); return -1; } - BUF_strlcpy(uis->result_buf, result, + strlcpy(uis->result_buf, result, uis->_.string_data.result_maxsize + 1); break; case UIT_BOOLEAN: |