mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-05 13:44:41 +02:00
fix possible out of bound read in PemToDer header, CU #3
This commit is contained in:
@@ -3456,6 +3456,9 @@ int PemToDer(const unsigned char* buff, long longSz, int type,
|
|||||||
|
|
||||||
headerEnd += XSTRLEN(header);
|
headerEnd += XSTRLEN(header);
|
||||||
|
|
||||||
|
if ((headerEnd + 1) >= bufferEnd)
|
||||||
|
return SSL_BAD_FILE;
|
||||||
|
|
||||||
/* eat end of line */
|
/* eat end of line */
|
||||||
if (headerEnd[0] == '\n')
|
if (headerEnd[0] == '\n')
|
||||||
headerEnd++;
|
headerEnd++;
|
||||||
|
Reference in New Issue
Block a user