[net.sources.bugs] Yet another "vc" problem

joe@petsd.UUCP (02/05/85)

A problem with "vc" I ran into (with a core dump) is that blank fields
aren't being initialized to zero.  When they are used in calculations, wierd
results occur, or a "Floating Exception, core dumped" occurs, killing your
data.  I use blank fields in forms to indicate that data should be entered
there (and not where the 0.00's appear).

The fix is simple.  Where "malloc" is called to allocate a struc, change
this to "calloc(1, *)", where "*" is the original malloc argument.  This
will guarantee that the floating point data is zeroed.  The sources to be
changed are interp.c, prog.c, and sc.c.

I am not posting a diff, because I have applied all the patches so far, and
the diff I could generate would contain much more than just my fix.

I would recommend that the author of "vc" post a new version, as I had a very
hard time applying all the current patches (some of them overlap).

					regards,
					joe

--
Full-Name:  Joseph M. Orost
UUCP:       ..!{decvax,ucbvax,ihnp4}!vax135!petsd!joe
ARPA:	    vax135!petsd!joe@BERKELEY
US Mail:    MS 313; Perkin-Elmer; 106 Apple St; Tinton Falls, NJ 07724
Phone:      (201) 870-5844
Location:   40 19'49" N / 74 04'37" W