diff options
Diffstat (limited to 'src/lib/libcrypto/bio/bss_log.c')
-rw-r--r-- | src/lib/libcrypto/bio/bss_log.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/lib/libcrypto/bio/bss_log.c b/src/lib/libcrypto/bio/bss_log.c index 5a79f72673..2d38837f9e 100644 --- a/src/lib/libcrypto/bio/bss_log.c +++ b/src/lib/libcrypto/bio/bss_log.c | |||
@@ -160,9 +160,7 @@ slg_write(BIO *b, const char *in, int inl) | |||
160 | if ((buf = (char *)OPENSSL_malloc(inl + 1)) == NULL) { | 160 | if ((buf = (char *)OPENSSL_malloc(inl + 1)) == NULL) { |
161 | return (0); | 161 | return (0); |
162 | } | 162 | } |
163 | strncpy(buf, in, inl); | 163 | strlcpy(buf, in, inl + 1); |
164 | buf[inl] = '\0'; | ||
165 | |||
166 | i = 0; | 164 | i = 0; |
167 | while (strncmp(buf, mapping[i].str, mapping[i].strl) != 0) | 165 | while (strncmp(buf, mapping[i].str, mapping[i].strl) != 0) |
168 | i++; | 166 | i++; |