[gnu.emacs.bug] Simple

GENTZEL@CPWSCA.PSC.EDU (Dave Gentzel) (06/28/89)

make_gap() declares its argument as `int' when it should be `unsigned int'.

This bug turned up as a result of the buggy VMS implementation of stat().  On
an indexed file, it was returning -512 for st_size and since st_size is
unsigned, it was a VERY large number.  When passed to make_gap(), it was
determined to be less than the current gap size (as -512 indeed is!) and
make_gap() returned.  Unfortunately, we now think the gap is big enough to
hold the file and start stomping on random memory.  Ouch!  Had make_gap()
declared its arg as unsigned, it would instead have generated an out-of-memory
error when trying to realloc the buffer.  Much more reasonable.

						Dave Gentzel
						Pittsburgh Supercomputing Center