Closed Bug 1314904 Opened 8 years ago Closed 8 years ago

uname() on success can return non-negative value (not just 0)

Categories

(Toolkit :: Startup and Profile System, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla52
Tracking Status
firefox52 --- fixed

People

(Reporter: petr.sumbera, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:45.0) Gecko/20100101 Firefox/45.0
Build ID: 20161020232743

Steps to reproduce:

uname() on Linux/BSD/Solaris returns -1 on error

uname() on Linux/BSD return 0 on success.

uname() on Solaris returns non-negative value (e.g. 1) on success.

Non-negative value is mentioned in standard:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/uname.html

Therefore check for an uname error in

toolkit/components/startup/nsUserInfoUnix.cpp

should modified from:

if (uname(&buf))

to

if (uname(&buf) < 0)
Attached patch Bug1314904.patch (obsolete) — Splinter Review
Attachment #8807094 - Flags: review?(dtownsend)
Component: Untriaged → Startup and Profile System
Product: Firefox → Toolkit
Attachment #8807094 - Flags: review?(dtownsend) → review+
Attached patch Bug1314904.patchSplinter Review
Sorry, there is another occurance of the same problem in widget/GfxInfoX11.cpp.
Attachment #8807094 - Attachment is obsolete: true
Attachment #8807594 - Flags: review?(benjamin)
Comment on attachment 8807594 [details] [diff] [review]
Bug1314904.patch

I'm technically not a widget peer but I think I can mark a general review for this.
Attachment #8807594 - Flags: review?(benjamin) → review+
Can somebody please mark it for integration? Or anything else need to be done? I'm new here...
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/9e60c1e0b3f1
uname() on success can return non-negative value (not just 0). r=bsmedberg
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/9e60c1e0b3f1
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: