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 还没有评估数据。