Alex CHEN

Results issues of Alex CHEN

我们工具扫出 [pbjson.cc#L238](https://github.com/baidu/sofa-pbrpc/blob/master/src/sofa/pbrpc/pbjson.cc#L238) parse_msg 有多个返回 NULL 的语句,但函数`pb2json` 包装 `parse_msg` 时不对返回做检查就传入 `json2string`。然后对 `parse_msg` 返回的 *json 做解引用,希望查询一下 ```c void pb2json(const Message* msg, std::string& str) { rapidjson::Value::AllocatorType allocator; rapidjson::Value* json = parse_msg(msg, allocator); json2string(json,...

[util.cpp#L216](https://github.com/bitcoin/bitcoin/blob/master/src/util.cpp#L216) if `fopen `failed, a null file pointer could be passed to `FileWriteStr(vMsgsBeforeOpenLog->front(), fileout);`

our tool reported a NULL pointer dereference, but I don't sure the thing, I am wondering under what situation that we can assure the `extern CChain chainActive;` in validation.h has...

Questions and Help

Hi, * [replication.c#L1805](https://github.com/antirez/redis/blob/unstable/src/replication.c#L1805) allocates a dfd, if `aeCreateFileEvent `failed,` goto error `will stop to keep tracking of dfd. ``` ........ dfd = open(tmpfile,O_CREAT|O_WRONLY|O_EXCL,0644); ....... if (aeCreateFileEvent(server.el,fd, AE_READABLE,readSyncBulkPayload,NULL) == AE_ERR) {...

[redis-check-rdb.c#L188](https://github.com/antirez/redis/blob/unstable/src/redis-check-rdb.c#L188) assign address of local variable `rdb` to global variable `rdbstate.rio`, so far I can't see it could cause any issues (rdb alive in all usage of rdbstate.rio), but still,...

Hi, reported two places might invoke twice of fclose, [aof.c#L1211](https://github.com/antirez/redis/blob/unstable/src/aof.c#L1211) and [rdb.c#L1008](https://github.com/antirez/redis/blob/unstable/src/rdb.c#L1008), they are similar as followed: ```c if (fclose(fp) == EOF) goto werr; ........ werr: ....... fclose(fp); ........ ```...

Hi, In function `anetUnixGenericConnect `[anet.c#L384](https://github.com/antirez/redis/blob/unstable/src/anet.c#L384), ```c if ((s = anetCreateSocket(err,AF_LOCAL)) == ANET_ERR) return ANET_ERR; sa.sun_family = AF_LOCAL; strncpy(sa.sun_path,path,sizeof(sa.sun_path)-1); if (flags & ANET_CONNECT_NONBLOCK) { if (anetNonBlock(err,s) != ANET_OK) return ANET_ERR; //

Hi, another one, in function `_anetTcpServer` of [anet.c#L480](https://github.com/antirez/redis/blob/unstable/src/anet.c#L480) , `anetV6Only` and `anetListen `will close socket `s` when they are going to return `ANET_ERR`, but `anetSetReuseAddr ` don't, could it be...

Our code analyzer has reported a potential Null Pointer Dereference in `initServer ` of server.c [server.c#L1784](https://github.com/antirez/redis/blob/unstable/src/server.c#L1784) `server.el = aeCreateEventLoop(server.maxclients+CONFIG_FDSET_INCR);` could return a NULL pointer if Linux API `epoll_create` fails (may...

Our code analyzer has reported a memory leak in `repl` function of [redis-cli.c#L1317](https://github.com/viennadd/redis/blob/unstable/src/redis-cli.c#L1317) ``` } else if (strcasecmp(argv[0],"restart") == 0) { if (config.eval) { config.eval_ldb = 1; config.output = OUTPUT_RAW;...