OCT 1. 修正代码静态扫描问题
This commit is contained in:
parent
5b1822198f
commit
1057061b7b
|
@ -109,7 +109,7 @@ unsigned char *base64_decode(const char *pBase64, unsigned int *pOutSize) {
|
|||
EVP_ENCODE_CTX *pCtx = EVP_ENCODE_CTX_new();
|
||||
#endif
|
||||
int enSize = 0;
|
||||
int size = 0;
|
||||
int size;
|
||||
unsigned char *pDecode = NULL;
|
||||
|
||||
if (pBase64 == NULL || strlen(pBase64) == 0) {
|
||||
|
|
|
@ -123,7 +123,7 @@ int symmetric_decrypto(AES_TYPE algorithmType,
|
|||
unsigned char iv[EVP_MAX_IV_LENGTH] = {0};
|
||||
const EVP_CIPHER *pCipher;
|
||||
|
||||
if (!pInBuf || !pOutSize || !pKey || inSize < 0) {
|
||||
if (!pInBuf || !pOutSize || !pKey || inSize == 0) {
|
||||
return -ERR_INPUT_PARAMS;
|
||||
}
|
||||
|
||||
|
@ -197,7 +197,7 @@ int symmetric_encrypto(AES_TYPE algorithmType,
|
|||
unsigned char iv[EVP_MAX_IV_LENGTH] = {0};
|
||||
const EVP_CIPHER *pCipher;
|
||||
|
||||
if (!pInBuf || !pOutSize || !pKey || inSize < 0) {
|
||||
if (!pInBuf || !pOutSize || !pKey || inSize == 0) {
|
||||
return -ERR_INPUT_PARAMS;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
// Created by xajhu on 2021/7/6 0006.
|
||||
//
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <uv.h>
|
||||
|
||||
#include "s2j/s2j.h"
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
#include <sds/sds.h>
|
||||
|
||||
#include "hardware.h"
|
||||
#include "task_manager.h"
|
||||
#include "user_errno.h"
|
||||
#include "uthash/uthash.h"
|
||||
#include "misc.h"
|
||||
|
|
|
@ -9,12 +9,15 @@
|
|||
|
||||
#include "msg_queue.h"
|
||||
#include "config.h"
|
||||
#include "misc.h"
|
||||
#include "s2j/s2j.h"
|
||||
#include "pppoe_info.h"
|
||||
#include "user_errno.h"
|
||||
|
||||
#ifdef LWIP_ON
|
||||
#include "misc.h"
|
||||
#include "pppoe_info.h"
|
||||
#include "user_info.h"
|
||||
#include "vxlan_pkg.h"
|
||||
#endif
|
||||
|
||||
#define AGENT_CMD_ADDUSER ("add-ywg-pppoe-vcpe")
|
||||
#define AGENT_CMD_REMOVUSER ("remove-ywg-pppoe-vcpe")
|
||||
|
@ -309,7 +312,7 @@ static void process_data_msg(void *UNUSED(pDataCh), zmq_msg_t *pMsg) {
|
|||
dzlog_debug("Process: %s\n", pMqMsg->params);
|
||||
decode_add_user_msg(pMqMsg->params, &p);
|
||||
if (p) {
|
||||
#if LWIP_ON
|
||||
#ifdef LWIP_ON
|
||||
int m, n;
|
||||
for (m = 0; m < p->infoCount; m++) {
|
||||
PADD_INFO pInfo = &(p->pInfo[m]);
|
||||
|
@ -340,7 +343,7 @@ static void process_data_msg(void *UNUSED(pDataCh), zmq_msg_t *pMsg) {
|
|||
decode_remove_user_msg(pMqMsg->params, &p);
|
||||
|
||||
if (p) {
|
||||
#if LWIP_ON
|
||||
#ifdef LWIP_ON
|
||||
int m;
|
||||
for (m = 0; m < p->nCount; m++) {
|
||||
user_info_remove(p->pUsers[m]);
|
||||
|
|
|
@ -24,7 +24,7 @@ typedef struct {
|
|||
const char *proto_decode_context(const char *pString, unsigned int *pVer, unsigned long long *pTm) {
|
||||
cJSON *pMsgCtx;
|
||||
unsigned char *pBase64;
|
||||
int decodeSize, ret;
|
||||
int decodeSize;
|
||||
unsigned int outSize = 0;
|
||||
char *pMsgContent = NULL;
|
||||
cJSON *pRoot = cJSON_Parse(pString);
|
||||
|
|
Loading…
Reference in New Issue