Path: utzoo!attcan!uunet!mcvax!ukc!warwick!cudcv From: cudcv@warwick.ac.uk (Rob McMahon) Newsgroups: comp.sources.bugs Subject: jove 4.9 (filter-region dumps core with GCC) Message-ID: <43@titania.warwick.ac.uk> Date: 10 Sep 88 11:09:05 GMT Reply-To: cudcv@warwick.ac.uk (Rob McMahon) Organization: Computing Services, Warwick University, UK Lines: 41 The filter-region command in jove uses mktemp("...") which dumps core when compiled with GCC or any compiler that puts strings in read-only memory. Fix: RCS file: proc.c,v retrieving revision 1.1 diff -c -r1.1 proc.c *** /tmp/,RCSt1a02006 Sat Sep 10 12:07:58 1988 --- proc.c Sat Sep 10 11:24:22 1988 *************** *** 748,754 **** { Mark *m = CurMark(); #ifndef MSDOS ! char *tname = mktemp("/tmp/jfilterXXXXXX"), combuf[128]; #endif /* MSDOS */ Window *save_wind = curwind; --- 748,755 ---- { Mark *m = CurMark(); #ifndef MSDOS ! static char tnambuf[20]; ! char *tname, combuf[128]; #endif /* MSDOS */ Window *save_wind = curwind; *************** *** 760,765 **** --- 761,768 ---- File *fp; #ifndef MSDOS + strcpy (tnambuf, "/tmp/jfilterXXXXXX"); + tname = mktemp(tnambuf); fp = open_file(tname, iobuff, F_WRITE, COMPLAIN, QUIET); #else /* MSDOS */ p0 = openforpipe(); -- UUCP: ...!mcvax!ukc!warwick!cudcv PHONE: +44 203 523037 JANET: cudcv@uk.ac.warwick ARPA: cudcv@warwick.ac.uk Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England