Mail Archives: djgpp/1996/03/31/15:24:45
In article <Pine DOT SUN DOT 3 DOT 91 DOT 960327181348 DOT 4844T-100000 AT is>,
Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> 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
- Raw text -