函数base64_decode内变量inlen判断条件不准确

This commit is contained in:
lilong
2023-01-06 10:35:05 +08:00
parent ee3b7bcb4c
commit 1e1fbf2c99

View File

@ -458,7 +458,7 @@ int base64_decode(const unsigned char* indata, unsigned int inlen, char* outdata
unsigned char c = 0;
int g = 3;
if (indata == NULL || inlen <= 0 || outdata == NULL || outlen == NULL || inlen % 4 != 0) {
if (indata == NULL || inlen == 0 || outdata == NULL || outlen == NULL || inlen % 4 != 0) {
ereport(WARNING, (errmsg("input arguments are error, please check those.")));
goto error;
}