Bug 56262 - souce code problems
Summary: souce code problems
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gftp
Version: 6.2
Hardware: alpha
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Havoc Pennington
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-11-14 18:53 UTC by d.binderman
Modified: 2007-04-18 16:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-11-14 19:10:37 UTC
Embargoed:


Attachments (Terms of Use)

Description d.binderman 2001-11-14 18:53:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.6 [en-gb]C-CCK-MCD NetscapeOnline.co.uk  (Win98; I)

Description of problem:

In compiling package gftp-2.0.6a-3, I got

1.

cc: Warning: file_transfer.c, line 606: Non-void function "ftp_get_files" does not contain a return statement. (missingreturn)
cc: Warning: file_transfer.c, line 727: Non-void function "ftp_put_files" does not contain a return statement. (missingreturn)

I produced the following patch

*** file_transfer.c.old	Fri Oct 19 15:58:11 2001
--- file_transfer.c	Fri Oct 19 15:58:34 2001
***************
*** 722,727 ****
--- 722,729 ----
     tdata->done = 1;
     pthread_mutex_unlock (&tdata->mutex);
     pthread_exit (NULL);
+ 
+    return 0;
  }
  /*****************************************************************************/
  void *ftp_put_files(void *ptr) {
***************
*** 855,860 ****
--- 857,864 ----
     tdata->done = 1;
     pthread_mutex_unlock (&tdata->mutex);
     pthread_exit (NULL);
+ 
+    return 0;
  }
  /*****************************************************************************/
  static void calc_kbs (struct ftp_transfer_data *tdata, ssize_t num_read) {

2.

cc: Info: rfc2068.c, line 470: In this statement, an array is being accessed outside the bounds specified for the array type. (subscrbounds)
   table[63] = '-';
---------^

I made the following patch

*** rfc2068.c.old	Fri Oct 19 16:00:05 2001
--- rfc2068.c	Fri Oct 19 16:00:19 2001
***************
*** 454,460 ****
  /* The standard to Base64 encoding can be found in RFC2045 */
  
     char *newstr, *newpos, *fillpos, *pos;
!    unsigned char table[63], encode[3];
     int i, num;
     
     for (i=0; i<26; i++) {
--- 454,460 ----
  /* The standard to Base64 encoding can be found in RFC2045 */
  
     char *newstr, *newpos, *fillpos, *pos;
!    unsigned char table[64], encode[3];
     int i, num;
     
     for (i=0; i<26; i++) {


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


How reproducible:
Always

Steps to Reproduce:
1. compile with Compaq ccc compiler
2.
3.
	

Additional info:

Comment 1 Havoc Pennington 2001-11-14 19:10:29 UTC
I mailed the gftp author about this.


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