Closed
Bug 620411
Opened 15 years ago
Closed 11 years ago
nsUserInfo::GetDomain performs a useless null check on an array in nsUserInfoUnix.cpp
Categories
(Toolkit :: Startup and Profile System, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: timeless, Assigned: timeless)
References
(Blocks 1 open bug)
Details
(Keywords: coverity)
Attachments
(1 file)
878 bytes,
patch
|
benjamin
:
review+
benjamin
:
approval2.0-
|
Details | Diff | Splinter Review |
134 nsUserInfo::GetDomain(char * *aDomain)
135 {
138 struct utsname buf;
160 if (buf.nodename && buf.nodename[0]) {
http://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/utsname.h.html
The <sys/utsname.h> header shall define the structure utsname which shall include at least the following members:
char sysname[] Name of this implementation of the operating system.
char nodename[] Name of this node within the communications
network to which this node is attached, if any.
char release[] Current release level of this implementation.
char version[] Current version level of this release.
char machine[] Name of the hardware type on which the system is running.
![]() |
||
Updated•15 years ago
|
Summary: nsUserInfo::GetDomain performs a useless null check on an array → nsUserInfo::GetDomain performs a useless null check on an array in nsUserInfoUnix.cpp
Assignee: nobody → timeless
Status: NEW → ASSIGNED
Attachment #498898 -
Flags: review?(benjamin)
Attachment #498898 -
Flags: approval2.0?
Updated•15 years ago
|
Attachment #498898 -
Flags: review?(benjamin)
Attachment #498898 -
Flags: review+
Attachment #498898 -
Flags: approval2.0?
Attachment #498898 -
Flags: approval2.0-
Keywords: checkin-needed
Keywords: checkin-needed
which means that warnings-as-errors builds on clang 3.5 fail.
patch compiles successfully here (at least insofar as passing that file; other bugs stop the build)
Can this be landed? It is hassle to keep applying this patch locally to build and then undo the change before committing changes for other bugs.
Comment 5•11 years ago
|
||
timeless said in IRC he can't remember why he removed checkin-needed (after comment 1), and that he's cool with me landing this on his behalf.
Comment 6•11 years ago
|
||
Tweaked commit message to describe-the-change (instead of the problem) & landed:
https://hg.mozilla.org/integration/mozilla-inbound/rev/373b1a2edd6a
(Hooray, one fewer local patch I have to apply locally to build w/ newish clang :))
Flags: in-testsuite-
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
Updated•7 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•