Fix a couple of missing bounds checks found via code analyzer.
This commit is contained in:
@@ -297,8 +297,10 @@ static int CEscape(int escaped, byte e, byte* out, word32* i, word32 maxSz,
|
||||
|
||||
if (raw)
|
||||
basic = e;
|
||||
else
|
||||
else if (e <= sizeof(base64Encode))
|
||||
basic = base64Encode[e];
|
||||
else
|
||||
return BAD_FUNC_ARG;
|
||||
|
||||
/* check whether to escape. Only escape for EncodeEsc */
|
||||
if (escaped == WC_ESC_NL_ENC) {
|
||||
|
||||
Reference in New Issue
Block a user