This service will be undergoing maintenance at 00:00 UTC, 2016-09-28. It is expected to last about 1 hours
Bug 79631 - bad source code
bad source code
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: busybox (Show other bugs)
8.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Walsh
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-12-14 05:17 EST by d.binderman
Modified: 2007-04-18 12:49 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-08-25 11:41:02 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2002-12-14 05:17:24 EST
Description of problem:

Hello there,

I just tried to compile package busybox-0.60.2-7 from Redhat 8.0.

Here are some of the compiler messages.

md5sum.c:446: warning: operation on `temp' may be undefined
md5sum.c:454: warning: operation on `temp' may be undefined
md5sum.c:461: warning: operation on `temp' may be undefined
md5sum.c:468: warning: operation on `temp' may be undefined
sed.c:427: warning: operation on `idx' may be undefined

Here is a patch which fixes the messages.

*** ./md5sum.c.old	2002-11-23 14:14:51.000000000 +0000
--- ./md5sum.c	2002-11-23 14:18:11.000000000 +0000
***************
*** 443,449 ****
  
      for ( i = 0 ; i < 16 ; i++ ) {
  	temp = A + FF(B,C,D) + cwp[(int)(*pp++)] + *pc++;
! 	temp = CYCLIC (temp, ps[i&3]);
  	temp += B;
  	A = D; D = C; C = B; B = temp;
      }
--- 443,449 ----
  
      for ( i = 0 ; i < 16 ; i++ ) {
  	temp = A + FF(B,C,D) + cwp[(int)(*pp++)] + *pc++;
! 	CYCLIC (temp, ps[i&3]);
  	temp += B;
  	A = D; D = C; C = B; B = temp;
      }
***************
*** 451,471 ****
      ps += 4;
      for ( i = 0 ; i < 16 ; i++ ) {
  	temp = A + FG(B,C,D) + cwp[(int)(*pp++)] + *pc++;
! 	temp = CYCLIC (temp, ps[i&3]);
  	temp += B;
  	A = D; D = C; C = B; B = temp;
      }
      ps += 4;
      for ( i = 0 ; i < 16 ; i++ ) {
  	temp = A + FH(B,C,D) + cwp[(int)(*pp++)] + *pc++;
! 	temp = CYCLIC (temp, ps[i&3]);
  	temp += B;
  	A = D; D = C; C = B; B = temp;
      }
      ps += 4;
      for ( i = 0 ; i < 16 ; i++ ) {
  	temp = A + FI(B,C,D) + cwp[(int)(*pp++)] + *pc++;
! 	temp = CYCLIC (temp, ps[i&3]);
  	temp += B;
  	A = D; D = C; C = B; B = temp;
      }
--- 451,471 ----
      ps += 4;
      for ( i = 0 ; i < 16 ; i++ ) {
  	temp = A + FG(B,C,D) + cwp[(int)(*pp++)] + *pc++;
! 	CYCLIC (temp, ps[i&3]);
  	temp += B;
  	A = D; D = C; C = B; B = temp;
      }
      ps += 4;
      for ( i = 0 ; i < 16 ; i++ ) {
  	temp = A + FH(B,C,D) + cwp[(int)(*pp++)] + *pc++;
! 	CYCLIC (temp, ps[i&3]);
  	temp += B;
  	A = D; D = C; C = B; B = temp;
      }
      ps += 4;
      for ( i = 0 ; i < 16 ; i++ ) {
  	temp = A + FI(B,C,D) + cwp[(int)(*pp++)] + *pc++;
! 	CYCLIC (temp, ps[i&3]);
  	temp += B;
  	A = D; D = C; C = B; B = temp;
      }
*** ./sed.c.old	2002-11-23 14:18:28.000000000 +0000
--- ./sed.c	2002-11-23 14:19:15.000000000 +0000
***************
*** 424,430 ****
  
  	/* second part (if present) will begin with a comma */
  	if (cmdstr[idx] == ',')
! 		idx += get_address(sed_cmd, &cmdstr[++idx], &sed_cmd->end_line, &sed_cmd->end_match);
  
  	/* last part (mandatory) will be a command */
  	if (cmdstr[idx] == '\0')
--- 424,434 ----
  
  	/* second part (if present) will begin with a comma */
  	if (cmdstr[idx] == ',')
!         {
!                 ++idx;
! 		idx += get_address(sed_cmd, &cmdstr[ idx], &sed_cmd->end_line, 
!                     &sed_cmd->end_match);
!         }
  
  	/* last part (mandatory) will be a command */
  	if (cmdstr[idx] == '\0')


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
    
Actual results:


Expected results:


Additional info:
Comment 1 Daniel Walsh 2004-08-25 11:41:02 EDT
Works fine in the current release.

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