mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-02 12:14:38 +02:00
fix possible out of bounds read in PemToDer, CU #1
This commit is contained in:
@@ -3534,7 +3534,7 @@ int PemToDer(const unsigned char* buff, long longSz, int type,
|
|||||||
/* eat end of line */
|
/* eat end of line */
|
||||||
if (consumedEnd[0] == '\n')
|
if (consumedEnd[0] == '\n')
|
||||||
consumedEnd++;
|
consumedEnd++;
|
||||||
else if (consumedEnd[1] == '\n')
|
else if ((consumedEnd + 1 < bufferEnd) && consumedEnd[1] == '\n')
|
||||||
consumedEnd += 2;
|
consumedEnd += 2;
|
||||||
else {
|
else {
|
||||||
if (info)
|
if (info)
|
||||||
|
Reference in New Issue
Block a user