Mail Archives: djgpp-workers/2001/09/24/07:30:43
On Mon, 24 Sep 2001, Andrew Cottrell wrote:
> Just spotted this in the djgpp newsgroup. What about the full_path = at line
> 199? It looks like this line also has the same problem.
No, line 199 belongs to a loop which indeed walks the exts[] array. The
next loop, the one where `which' crashed, doesn't walk exts[] but instead
chops the value of the WHICH environment variable into individual
extensions, whereby a pointer to each individual extension is in turn put
into the ext variable. The bug was due to cut-and-paste between these
two loops: the buggy line was referencing exts[indx], which would bomb
because the value of indx was left from the previous loop, and therefore
was outside the valid limits for the exts[] array.
> I checked out the differences between Which 2.11 and 2.12 and the changes
> are with the man pages only. I couldn't see who produced the DJGPP port as
> it has allot of DJGPP changes compared to the original which.c source.
I have a few more complaints about the ported Which. For example,
there's no DJGPP-specific README anywhere in sight, and it looks like a
user is supposed to run "sh ./configure" to configure the package. These
things shouldn't be left without saying them explicitly.
> The next time I build the Which package for testing under WIn 2K should I
> include these changes?
I don't see any sense in producing a binary that is known to bomb...
> I can also produce a source package as well.
Any binary distribution should be accompanied by a source distribution.
If you produce the binary from modified sources, you should make those
modified sources available as well. That's a GPL requirement.
- Raw text -