Closed Bug 1278504 Opened 4 years ago Closed 4 years ago
[Static Analysis][Buffer not null terminated] In function List
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.
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)
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 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
You need to log in before you can comment on or make changes to this bug.