Xref: news2.mv.net comp.os.msdos.djgpp:2301 From: olly AT mantis DOT co DOT uk (Olly Betts) Newsgroups: comp.os.msdos.djgpp Subject: Re: Bug in `_is_executable', with a patch Date: 31 Mar 1996 17:14:09 +0100 Organization: techn-ol-ogy Lines: 25 Message-ID: <19960331160925.olly@mantis.co.uk> References: To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In article , Eli Zaretskii wrote: >! char tmp_buf[6]; >[snip] >--- 183,197 ---- > && strlen(extension) <= ((extension[0]=='.') ? 4 : 3)) > { > /* Search the list of extensions in executables[]. */ >! char tmp_buf[5], *tp = tmp_buf; > >! *tp++ = '|'; >! if (*extension == '.') >! extension++; >! while (*extension) >! *tp++ = toupper (*extension++); >! *tp++ = '|'; >! *tp = '\0'; I think tmp_buf needs to be (at least) 6 in size. One for the '|', up to 3 for the extension, another '|', and the terminating '\0' makes 6. Olly -- cool wet grass cool wet grass cool wet grass cool wet grass cool wet grass