cpp/missing-check-scanf: False positive
Ouverte
acknowledged
C++
false-positive
- Langage dominant
- CodeQL
- Étoiles
- 10.1k
- Forks
- 2.1k
- Merge moyen
- 2 j 15 h
- PR mergées (30 j)
- 141
Description
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)`.
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.