Closed
Bug 1278504
Opened 8 years ago
Closed 8 years ago
[Static Analysis][Buffer not null terminated] In function ListInterfaceAddresses
Categories
(Core :: Networking, defect)
Core
Networking
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.
Assignee | ||
Comment 1•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/58188/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/58188/
Attachment #8760679 -
Flags: review?(valentin.gosu)
Assignee | ||
Comment 2•8 years ago
|
||
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/
Comment 3•8 years ago
|
||
Comment on attachment 8760679 [details]
Bug 1278504 - fixed buffer not null terminated.
https://reviewboard.mozilla.org/r/58188/#review55060
Thanks!
Attachment #8760679 -
Flags: review?(valentin.gosu) → review+
Pushed by Bogdan.Postelnicu@softvision.ro:
https://hg.mozilla.org/integration/mozilla-inbound/rev/be7175764dc7
fixed buffer not null terminated. r=valentin
Comment 5•8 years ago
|
||
bugherder |
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.
Description
•