Bug 115162

Summary: subscript out of range & too many arguments
Product: [Fedora] Fedora Reporter: d.binderman
Component: mars-nweAssignee: Thomas Woerner <twoerner>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: medium Docs Contact:
Priority: medium    
Version: 1CC: mgarski
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-29 15:24:13 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 133398    

Description d.binderman 2004-02-07 14:18:20 UTC
Description of problem:

I just tried to compile package mars-nwe-0.99pl20-13 from Fedora.

The compiler said

1.

../nwserv.c(1558): warning #140: too many arguments in function call

The source code is

          if (call_wdog) send_wdogs(1);

but, earlier in the file

static void send_wdogs()
{

Suggest remove 1 from parameter list.

2.

../nwbind.c(1893): warning #175: subscript out of range

The source code is

  struct XDATA {
    uint8 count_handles[4];
    uint8 handles[4];
  } *xdata = (struct XDATA*) data;
  int open_files = GET_BE32(xdata->count_handles);
  int handle0    = open_files < 1 ? 0 : GET_BE32(xdata->handles);
  int handle1    = open_files < 2 ? 0 : GET_BE32(xdata->handles+4);

It's a good bet here that handle1 is trying to access xdata->handles[ 4],
which doesn't exist.

I'm not sure what a good fix for this is.





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


How reproducible:


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


Expected results:


Additional info:

Comment 1 Marcin Garski 2004-09-29 15:24:13 UTC
Thanks for the bug report.
However, Red Hat no longer maintains mars-nwe.

The Fedora Legacy project (http://fedoralegacy.org/) maintains some
older releases, and if you believe this bug is interesting to them,
please report the problem in the bug tracker at:
http://bugzilla.fedora.us/