* exceptions.cc (open_stackdumpfile): Correctly append .stackdump

suffix.

	* nlsfuncs.cc (rebase_locale_buf): Reorder arguments.  Accommodate
	throughout.  Add pointer to end of buffer and avoid changing pointers
	not pointing into the buffer.
This commit is contained in:
Corinna Vinschen
2010-06-01 14:51:47 +00:00
parent 80a10a3972
commit ded1f66c2d
3 changed files with 25 additions and 17 deletions

View File

@ -140,12 +140,11 @@ open_stackdumpfile ()
p = myself->progname;
WCHAR corefile[wcslen (p) + sizeof (".stackdump")];
wcscpy(corefile, p);
wcpcpy (wcpcpy(corefile, p), L".stackdump");
UNICODE_STRING ucore;
OBJECT_ATTRIBUTES attr;
/* Create the UNICODE variation of <progname>.stackdump. */
RtlInitUnicodeString (&ucore, corefile);
RtlAppendUnicodeToString (&ucore, L".stackdump");
/* Create an object attribute which refers to <progname>.stackdump
in Cygwin's cwd. Stick to caseinsensitivity. */
InitializeObjectAttributes (&attr, &ucore, OBJ_CASE_INSENSITIVE,