fix: init logbuf to avoid invalid write
This commit is contained in:
parent
5374680649
commit
f51e1b8405
|
@ -80,7 +80,7 @@ void vnodeSyncCommitMsg(SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cbMeta)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cbMeta.index > beginIndex) {
|
if (cbMeta.index > beginIndex) {
|
||||||
char logBuf[256];
|
char logBuf[256] = {0};
|
||||||
snprintf(
|
snprintf(
|
||||||
logBuf, sizeof(logBuf),
|
logBuf, sizeof(logBuf),
|
||||||
"==callback== ==CommitCb== execute, pFsm:%p, index:%ld, isWeak:%d, code:%d, state:%d %s, beginIndex :%ld\n",
|
"==callback== ==CommitCb== execute, pFsm:%p, index:%ld, isWeak:%d, code:%d, state:%d %s, beginIndex :%ld\n",
|
||||||
|
|
Loading…
Reference in New Issue