Mercurial > hg > xemacs-beta
comparison src/nt.c @ 3648:3e7493e76dc7
[xemacs-hg @ 2006-11-01 20:25:48 by adrian]
fix for ffap crash on Windows (was: [Bug: 21.5-b27] [CRASH] (file-name-directory "1:"))
-------------------- ChangeLog entries follow: --------------------
src/ChangeLog addition:
2006-11-01 Adrian Aichner <adrian@xemacs.org>
* sysdep.c (wcslen): Check for NULL pointer.
* sysdep.c (strlwr): Ditto.
* nt.c (mswindows_getdcwd): Ditto (actual cause of reported
crash).
* intl-win32.c (wcscmp): Ditto.
* intl-win32.c (wcslen): Ditto.
* intl-win32.c (wcsncpy): Ditto.
* intl-win32.c (wcscpy): Ditto.
* intl-win32.c (wcsdup): Ditto.
* fileio.c (Ffile_name_directory): Return Qnil when
mswindows_getdcwd returns NULL working directory.
author | adrian |
---|---|
date | Wed, 01 Nov 2006 20:25:50 +0000 |
parents | 15139dbf89f4 |
children | 866b84b7c97e |
comparison
equal
deleted
inserted
replaced
3647:510e0d6cee7e | 3648:3e7493e76dc7 |
---|---|
1817 | 1817 |
1818 if (XEUNICODE_P) | 1818 if (XEUNICODE_P) |
1819 cwdext = (Extbyte *) _wgetdcwd (drivelet, NULL, 0); | 1819 cwdext = (Extbyte *) _wgetdcwd (drivelet, NULL, 0); |
1820 else | 1820 else |
1821 cwdext = _getdcwd (drivelet, NULL, 0); | 1821 cwdext = _getdcwd (drivelet, NULL, 0); |
1822 if (cwdext == NULL) return NULL; | |
1822 TSTR_TO_C_STRING_MALLOC (cwdext, cwd); | 1823 TSTR_TO_C_STRING_MALLOC (cwdext, cwd); |
1823 xfree (cwdext, Extbyte *); | 1824 xfree (cwdext, Extbyte *); |
1824 return cwd; | 1825 return cwd; |
1825 } | 1826 } |
1826 | 1827 |