diff --git a/src/ssl.c b/src/ssl.c index cc4f0a121..8c4cd4a7f 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1771,7 +1771,7 @@ int CyaSSL_Init(void) { /* remove encrypted header if there */ char encHeader[] = "Proc-Type"; - char* line = XSTRNSTR((char*)buff, encHeader, PEM_LINE_LEN); + char* line = XSTRNSTR(headerEnd, encHeader, PEM_LINE_LEN); if (line) { char* newline; char* finish;