Package: nvclock
Version: 0.8b2-1
Severity: important
Tags: patch, etch

If nvclock is used inside an environment where no $HOME is set, it
segfaults. This can be the case e.g. inside a script which exports
the GPU temperature via inetd and tcpd -- that's how we noticed it.

How to repeat:

$ env -i nvclock -T
$ env -i HOME=/tmp/ nvclock -T

Since nvclock just needs $HOME for creating a config file if it
doesn't exist, it can work fine without config file at all. So here's
a patch which ignores config files at all if $HOME isn't set and
therefore prevents this segfault:

----------------------------------------------------------------------
--- src/backend/config.c~       2006-07-28 17:56:43.000000000 +0200
+++ src/backend/config.c        2007-07-16 20:47:29.000000000 +0200
@@ -270,7 +270,7 @@
 
        if(!(home = getenv("HOME")))
        {
-               /* error */
+               return 1;
        }
 
        nvclock.path = malloc(strlen(home) + strlen("/.nvclock") +1);
----------------------------------------------------------------------

Works fine here.

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.22-amd64-1
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages nvclock depends on:
ii  libc6                       2.3.6.ds1-13 GNU C Library: Shared libraries
ii  libx11-6                    2:1.0.3-7    X11 client-side library
ii  libxext6                    1:1.0.1-2    X11 miscellaneous extension librar

nvclock recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to