Mercurial > hg > xemacs-beta
diff src/fileio.c @ 1116:3bcd77d0bf93
[xemacs-hg @ 2002-11-22 12:57:09 by ben]
file-truename and other crash
fileio.c: Fix crashes due to incorrectly ported code from
FSF.
realpath.c: Don't return EIO when a filename is incorrect,
since the I/O error gets passed all the way up. Clean up this
file and avoid using macros as a poor-man's dispatch mechanism --
it just makes it impossible to follow the code.
author | ben |
---|---|
date | Fri, 22 Nov 2002 12:57:11 +0000 |
parents | 184461bc8de4 |
children | 37bdd24225ef |
line wrap: on
line diff
--- a/src/fileio.c Thu Nov 21 22:53:01 2002 +0000 +++ b/src/fileio.c Fri Nov 22 12:57:11 2002 +0000 @@ -374,10 +374,12 @@ res = alloca_array (Ibyte, (wd ? qxestrlen (wd) : 0) + 10); /* go overboard */ + res[0] = '\0'; if (p == beg + 4 && IS_DIRECTORY_SEP (*beg) && beg[1] == ':') { qxestrncpy (res, beg, 2); beg += 2; + res[2] = '\0'; } if (wd)