diff --git a/crypto/dist/openssl/crypto/pem/pem_lib.c b/crypto/dist/openssl/crypto/pem/pem_lib.c index 01759f75c3b5..ef16b5e9c74e 100644 --- a/crypto/dist/openssl/crypto/pem/pem_lib.c +++ b/crypto/dist/openssl/crypto/pem/pem_lib.c @@ -140,9 +140,9 @@ void PEM_proc_type(char *buf, int type) else str="BAD-TYPE"; - strcat(buf,"Proc-Type: 4,"); - strcat(buf,str); - strcat(buf,"\n"); + strlcat(buf, "Proc-Type: 4,", PEM_BUFSIZE); + strlcat(buf, str, PEM_BUFSIZE); + strlcat(buf, "\n", PEM_BUFSIZE); } void PEM_dek_info(char *buf, const char *type, int len, char *str) @@ -151,9 +151,9 @@ void PEM_dek_info(char *buf, const char *type, int len, char *str) long i; int j; - strcat(buf,"DEK-Info: "); - strcat(buf,type); - strcat(buf,","); + strlcat(buf, "DEK-Info: ", PEM_BUFSIZE); + strlcat(buf, type, PEM_BUFSIZE); + strlcat(buf, ",", PEM_BUFSIZE); j=strlen(buf); for (i=0; idata,"%s/%08lx.%s%d",ctx->dirs[i],h, - postfix,k); + snprintf(b->data, b->max, "%s/%08lx.%s%d", + ctx->dirs[i], h, postfix, k); k++; if (stat(b->data,&st) < 0) break;