github / github/codeql

cpp/missing-check-scanf: False positive

Đang mở
#12,412 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
acknowledged C++ false-positive
Ngôn ngữ chính
CodeQL
Star
10.1k
Fork
2.1k
Merge trung bình
2 ngày 15 giờ
Pull request đã merge (30 ngày)
141

Mô tả

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)`.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.