fix possible out of bound read in PemToDer header, CU #3

This commit is contained in:
Chris Conlon
2016-06-24 14:37:45 -06:00
parent 2951e167b5
commit 92e501c8e4

View File

@@ -3456,6 +3456,9 @@ int PemToDer(const unsigned char* buff, long longSz, int type,
headerEnd += XSTRLEN(header);
if ((headerEnd + 1) >= bufferEnd)
return SSL_BAD_FILE;
/* eat end of line */
if (headerEnd[0] == '\n')
headerEnd++;