Subject: pkg/26523: xosview-1.8.1 does not start if called with -name option
To: None <gnats-bugs@gnats.netbsd.org>
From: Alexander Becher <abecher@kawo2.rwth-aachen.de>
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
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Becher
>Release:        NetBSD 2.0_BETA
>Organization:
>Environment:
	
	
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
>Description:
    xosview has buggy pointer arithmetic in the file Xrm.cc which causes
    it to exit with the following error when called with a -name
    parameter:

    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
    http://bugs.debian.org/182281
	
>How-To-Repeat:
    cd /usr/pkgsrc/sysutils/xosview
    make install
    xosview -name FvwmXosview
	
>Fix:
--- Xrm.cc.orig 2004-08-03 00:04:30.000000000 +0200
+++ Xrm.cc      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);
   }
	


>Release-Note:
>Audit-Trail:
>Unformatted: