Bug 82192 - broken source code
broken source code
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: ruby (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Akira TAGOH
Bill Huang
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-19 05:47 EST by d.binderman
Modified: 2007-04-18 12:50 EDT (History)
0 users

See Also:
Fixed In Version: 1.6.8-7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-04 13:00:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-01-19 05:47:03 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

Hello there,

I just tried to compile package ruby-1.6.7-10 from Redhat 8.0

The compiler said

ruby.c:914: warning: operation on `s' may be undefined

Here is an untested patch to shut up the compiler.

*** ./ruby-1.6.7/ruby.c.old	2003-01-19 09:34:17.000000000 +0000
--- ./ruby-1.6.7/ruby.c	2003-01-19 09:35:02.000000000 +0000
***************
*** 911,917 ****
  	/* See if all the arguments are contiguous in memory */
  	for (i = 1; i < origargc; i++) {
  	    if (origargv[i] == s + 1)
! 		s += strlen(++s);	/* this one is ok too */
  	}
  	len = s - origargv[0];
      }
--- 911,920 ----
  	/* See if all the arguments are contiguous in memory */
  	for (i = 1; i < origargc; i++) {
  	    if (origargv[i] == s + 1)
! 	    {
! 		++s;
! 		s += strlen( s);	/* this one is ok too */
! 	    }
  	}
  	len = s - origargv[0];
      }

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. compile the program
2.
3.
    

Additional info
Comment 1 Akira TAGOH 2003-07-04 13:00:01 EDT
Fixed.

Note You need to log in before you can comment on or make changes to this bug.