Mercurial > hg > xemacs-beta
diff src/sysdep.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 | 5eb04c84c7ae |
children | b3d7b8b98acf |
line wrap: on
line diff
--- a/src/sysdep.c Tue Oct 31 22:51:31 2006 +0000 +++ b/src/sysdep.c Wed Nov 01 20:25:50 2006 +0000 @@ -3491,6 +3491,7 @@ size_t wcslen (const wchar_t *s) { + if (s == NULL) return NULL; const wchar_t *p = s; while (*p++) @@ -3508,6 +3509,7 @@ char * strlwr (char *s) { + if (s == NULL) return NULL; REGISTER char *c; for (c = s; *c; c++)