From owner-freebsd-ports Fri Aug 11 13:50: 8 2000 Delivered-To: freebsd-ports@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 8DEB937B6D5 for ; Fri, 11 Aug 2000 13:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id NAA94791; Fri, 11 Aug 2000 13:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from home.dragondata.com (home.dragondata.com [204.137.237.2]) by hub.freebsd.org (Postfix) with ESMTP id CAB4E37B6DC for ; Fri, 11 Aug 2000 13:42:31 -0700 (PDT) (envelope-from toasty@shell1.dragondata.com) Received: from shell1.dragondata.com (root@shell1 [204.137.237.8]) by home.dragondata.com (8.9.2/8.9.2) with ESMTP id PAA11993 for ; Fri, 11 Aug 2000 15:42:30 -0500 (CDT) Received: (from root@localhost) by shell1.dragondata.com (8.9.3/8.9.3) id PAA90513; Fri, 11 Aug 2000 15:42:46 -0500 (CDT) (envelope-from toasty) Message-Id: <200008112042.PAA90513@shell1.dragondata.com> Date: Fri, 11 Aug 2000 15:42:46 -0500 (CDT) From: toasty@dragondata.com Reply-To: toasty@dragondata.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: ports/20538: Segfault in ports/devel/cutils cobfusc Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 20538 >Category: ports >Synopsis: Segfault in ports/devel/cutils cobfusc >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Aug 11 13:50:01 PDT 2000 >Closed-Date: >Last-Modified: >Originator: Kevin Day >Release: FreeBSD 4.0-STABLE i386 >Organization: DragonData Internet Services >Environment: cobfusc in any system after 3.0(?) >Description: I can't exactly figure out why this worked on my 2.2.8 system but doesn't now. My only guess is that toupper() and tolower() were implemented differently. >How-To-Repeat: cobfusc -c lower cobfusc.c >Fix: --- cobfusc.c.orig Wed Mar 26 07:58:16 1997 +++ cobfusc.c Fri Aug 11 15:36:09 2000 @@ -342,25 +342,31 @@ /* * Convert the string to uppercase. */ - while (*p) - *p = toupper(*p++); + while (*p) { + *p = toupper(*p); + p++; + } break; case 2: /* * Convert the string to lowercase. */ - while (*p) - *p = tolower(*p++); + while (*p) { + *p = tolower(*p); + p++; + } break; default: /* * Convert the string to random case. */ - while (*p) + while (*p) { if (RANDOM(2) == 1) - *p = toupper(*p++); + *p = toupper(*p); else - *p = tolower(*p++); + *p = tolower(*p); + p++; + } } return buf; >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message