mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-31 19:24:42 +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 */
|
||||
if (consumedEnd[0] == '\n')
|
||||
consumedEnd++;
|
||||
else if (consumedEnd[1] == '\n')
|
||||
else if ((consumedEnd + 1 < bufferEnd) && consumedEnd[1] == '\n')
|
||||
consumedEnd += 2;
|
||||
else {
|
||||
if (info)
|
||||
|
Reference in New Issue
Block a user