Summary: | Call to uname should not check for return == 0 | ||||||
---|---|---|---|---|---|---|---|
Product: | xorg | Reporter: | Alan Coopersmith <alan.coopersmith> | ||||
Component: | Server/General | Assignee: | Alan Coopersmith <alan.coopersmith> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | minor | ||||||
Priority: | medium | CC: | roland.mainz | ||||
Version: | git | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
i915 platform: | i915 features: | ||||||
Attachments: |
|
Description
Alan Coopersmith
2004-12-20 19:12:26 UTC
Checking to see if there's any other uname calls in the tree that should be fixed at the same time, and then will fix. There's a couple places to fix this for now: ./lib/Xmu/CvtStdSel.c: if (uname (&utss) == 0) { ./programs/Xserver/hw/xfree86/common/xf86Init.c: if (uname(&name) == 0) { ./programs/Xserver/hw/xfree86/os-support/bus/Sbus.c: if ((uname(&buffer) == 0) There's a bunch of other uname calls found which don't have this problem: - Already do the check right: ./config/imake/imake.c: if (uname(&uts_name) < 0) ./lib/X11/ConnDis.c: if (!pprotocol && phostname && uname(&sys) >= 0 && ./lib/xtrans/Xtranslcl.c: if (uname (&name) >= 0 && strcmp (host, - Check for 0, but only on platforms that specify 0 for correct returns: ./config/imake/imake.c: if (uname(&uts) != 0) [inside #ifdef NetBSD] ./programs/Xserver/hw/darwin/darwin.c: if (uname(&name) == 0) { - Don't check results at all (probably should, but uname failures should be rare, so I'm not fixing right now, will leave that to someone else): ./lib/FS/FSlibInt.c: uname(&name); ./lib/X11/XlibInt.c: uname (&name); ./lib/Xmu/GetHost.c: uname (&name); ./lib/Xt/Initialize.c: uname (&name); ./lib/dps/cslibint.c: uname (&name); ./lib/xtrans/Xtrans.c: uname (&name); ./programs/Xserver/hw/dmx/dmxinit.c: uname(&u); ./programs/Xserver/hw/xfree86/os-support/bsd/bsd_init.c: uname (&uts); ./programs/Xserver/os/access.c: uname(&name); ./programs/lbxproxy/di/wire.c: uname (&name); ./programs/xdm/auth.c: uname(&name); ./programs/xrx/rx/XUrls.c: uname(&host); Created attachment 1587 [details] [review] Patch to fix uname return value checks Committed to CVS HEAD: CVSROOT: /cvs/xorg Module name: xc Changes by: alanc@gabe.freedesktop.org 04/12/22 00:28:17 Log message: 2004-12-22 Alan Coopersmith <alan.coopersmith@sun.com> * xc/programs/Xserver/hw/xfree86/common/xf86Init.c: * xc/lib/Xmu/CvtStdSel.c: * xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c: Bug #2123 <https://bugs.freedesktop.org/show_bug.cgi?id=2123> Attachment #1587 [details] <https://bugs.freedesktop.org/attachment.cgi?id=1587> Call to uname should not check for return == 0, but for >= 0 instead Modified files: ./: ChangeLog xc/programs/Xserver/hw/xfree86/common/: xf86Init.c xc/lib/Xmu/: CvtStdSel.c xc/programs/Xserver/hw/xfree86/os-support/bus/: Sbus.c Revision Changes Path 1.624 +10 -1 xc/ChangeLog 1.16 +5 -1 xc/programs/Xserver/hw/xfree86/common/xf86Init.c 1.3 +1 -1 xc/lib/Xmu/CvtStdSel.c 1.3 +1 -1 xc/programs/Xserver/hw/xfree86/os-support/bus/Sbus.c |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.