Subject: pkg/26523: xosview-1.8.1 does not start if called with -name option
To: None <>
From: Alexander Becher <>
List: pkgsrc-bugs
Date: 08/03/2004 00:13:55
>Number:         26523
>Category:       pkg
>Synopsis:       xosview-1.8.1 does not start if called with -name option
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 02 22:15:00 UTC 2004
>Originator:     Alexander Becher
>Release:        NetBSD 2.0_BETA
System: NetBSD abc 2.0_BETA NetBSD 2.0_BETA (MYKERNEL-2-0) #0: Tue Jul 27 21:26:58 CEST 2004 alex@abc:/usr/local/obj/obj/sys/arch/i386/compile/MYKERNEL-2-0 i386
Architecture: i386
Machine: i386
    xosview has buggy pointer arithmetic in the file which causes
    it to exit with the following error when called with a -name

    Error:  Couldn't find 'samplesPerSec' resource in the resource database!

    This does not happen when xosview is called without the -name option.
    The same problem is mentioned in
    cd /usr/pkgsrc/sysutils/xosview
    make install
    xosview -name FvwmXosview
--- 2004-08-03 00:04:30.000000000 +0200
+++      2004-08-03 00:04:57.000000000 +0200
@@ -98,7 +98,7 @@
     char fcn_lower[1024];
     strncpy(fcn_lower, className(), 1024);
     char* p = fcn_lower;
-    while (p && *p)  *p++ = tolower(*p);
+    while (p && *p)  { *p = tolower(*p); p++; }
     snprintf(fcn, 1024, "%s.%s", fcn_lower, rname);
     XrmGetResource(_db, frn, fcn, &type, &val);