[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
20001002: nmaplib/pgen routine argument mismatches
- Subject: 20001002: nmaplib/pgen routine argument mismatches
- Date: Mon, 2 Oct 2000 14:39:14 -0600
Scott and Steve,
There are argument type mismatches with the nmaplib/pgen routines:
nmap_pgwfmt.c pgwfmt_createOptArea()
nmap_pgutls.c pgutls_createOptionMenu()
nmap_pgofmt.c pgofmt_createOptArea()
In each case, the argument list of the subroutine types an argument as
integer, but the calling routine passes a pointer to integer.
Inside each of these routines is an attempt to create a pointer
to integer from the supposed integer using a (int *) cast.
The internal use of optval and optvalp and start_item and
pstart_item is opposite the convention for the "pointer to" syntax.
1) pgwfmt_createOptArea()
The prototype for the argument list for pgwfmt_createOptArea() should be
int *optvalp
2) pgutls_createOptionMenu()
The prototype for the 3rd element being passed to
pgutls_createOptionMenu() should be:
int *pstart_item;
3) Same *optval problem as for pgwfmt_createOptArea()
The above type mismatches, and subsequent use of cast values in
comparisons andarray indexing cause segmentation faults under OSF/1 when
starting up.
I have uploaded the 3 files mentioned above with modifications
to the referenced pointer/integer values to the upc area on AS2.
Steve
------------------------------------------------------------------------
Steve Chiswell
Unidata User Support