Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucla-cs.ARPA Path: utzoo!watmath!clyde!bonnie!akgua!sdcsvax!sdcrdcf!trwrba!cepu!ucla-cs!ekrell From: ekrell@ucla-cs.UUCP Newsgroups: net.sources.bugs Subject: Re: Patch patch... Message-ID: <2384@ucla-cs.ARPA> Date: Sun, 25-Nov-84 20:49:42 EST Article-I.D.: ucla-cs.2384 Posted: Sun Nov 25 20:49:42 1984 Date-Received: Wed, 28-Nov-84 01:41:58 EST References: <320@rna.UUCP> Reply-To: ekrell@ucla-cs.UUCP (Eduardo Krell) Organization: UCLA Computer Science Department Lines: 50 Summary: In article <320@rna.UUCP> dan@rna.UUCP (Dan Ts'o) writes: > > Alas things are still not well with patch - I occassionally get >core dumps in malloc(), via savestr(), but I haven't had a chance to >track that one down yet. Here's the fix for that problem (The last pointer of i_ptr was pointing to garbage): *** patch.c Sun Nov 25 17:41:58 1984 --- patch.c.new Sun Nov 25 22:53:08 1984 *************** *** 750,756 iline = 1; i_ptr[iline] = i_womp; ! for (s=i_womp; *s; s++) { if (*s == '\n') i_ptr[++iline] = s+1; /* these are NOT null terminated */ } --- 750,756 ----- iline = 1; i_ptr[iline] = i_womp; ! for (s=i_womp; *(s+1); s++) { if (*s == '\n') i_ptr[++iline] = s+1; /* these are NOT null terminated */ } *************** *** 754,760 if (*s == '\n') i_ptr[++iline] = s+1; /* these are NOT null terminated */ } ! input_lines = iline - 1; /* now check for revision, if any */ --- 754,760 ----- if (*s == '\n') i_ptr[++iline] = s+1; /* these are NOT null terminated */ } ! input_lines = iline; /* now check for revision, if any */ -- Eduardo Krell UCLA Computer Science Department ekrell@ucla-locus.arpa ..!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!ekrell