cpp/missing-check-scanf: False positive
未關閉
acknowledged
C++
false-positive
- 主要語言
- CodeQL
- 星號
- 10.1k
- 分支
- 2.1k
- 平均合併
- 2 天 15 小時
- 30 天內合併 PR
- 141
描述
https://github.com/ryao/zfs/security/code-scanning/420
https://github.com/ryao/zfs/blob/3881dd42bbfb7297f08e796c38b35d54e11ac500/lib/libspl/os/linux/gethostid.c#L50
CodeQL says `This variable is read, but may not have been written. It should be guarded by a check that the returns at least 1.`. However, that is already being done as part of `if (fscanf(f, "%lx", &hostid) != 1)`.
貢獻指南
評估
這個 Issue 還沒有評估資料。