www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/08/10/16:25:40

Message-Id: <199608102021.FAA03069@mercury.st.rim.or.jp>
To: djgpp-workers AT delorie DOT com
Subject: problems in bash
Mime-Version: 1.0
Date: Sun, 11 Aug 1996 05:21:18 +0900
From: =?ISO-2022-JP?B?GyRCQEQ7M0JnMnAbKEI=?= /Daisuke Aoyama <jack AT st DOT rim DOT or DOT jp>

`xstat.h' says MAX_TRUE_NAME is 128 but `limits.h' says PATH_MAX is 512.

>int
>stat(const char *path, struct stat *statbuf)
>{
>  int            e = errno;
>  char pathname[MAX_TRUE_NAME], *p;
>
>  if (!path || !statbuf)
>    {
>      errno = EFAULT;
>      return -1;
>    }
>
>  strcpy(pathname, path)
>  p = pathname + strlen(pathname) - 1;

It is rarely `path' is copied over array (and crash)
I suggest it check `path' length before copying.

If coff file executed by `go32-v2' then all of exception handlers were broken
(by `go32-v2' ?). Is it only problem under Win95 ?

------
Daisuke Aoyama
jack AT st DOT rim DOT or DOT jp

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019