Closed Bug 1278504 Opened 8 years ago Closed 8 years ago

[Static Analysis][Buffer not null terminated] In function ListInterfaceAddresses

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: andi, Assigned: andi)

References

(Blocks 1 open bug)

Details

(Keywords: coverity, Whiteboard: CID 1362514)

Attachments

(1 file)

The Static Analysis tool Coverity detected that a buffer not null terminated issue can happen in the following context: >> struct ifreq ifreq; >> memset(&ifreq, 0, sizeof(struct ifreq)); >> strncpy(ifreq.ifr_name, aInterface, IFNAMSIZ); The issue was triggered on strncpy call because IFNAMSIZ is the same value as the size of ifreq.ifr_name -> 16 bytes.
Comment on attachment 8760679 [details] Bug 1278504 - fixed buffer not null terminated. Review request updated; see interdiff: https://reviewboard.mozilla.org/r/58188/diff/1-2/
Attachment #8760679 - Flags: review?(valentin.gosu) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: