* Fabian Greffrath <fab...@greffrath.com>, 2015-01-12, 10:53:
PCHAR BASE_LFN_GetCurrentDir(PCHAR Directory, size_t Size)
{
Directory = (PCHAR) getcwd(Directory, Size);
strcpy(Directory, BASE_LFN_LongName(Directory));
return Directory;
}
[...]
But BASE_LFN_LongName(Directory) returns just Directory. So strcpy(3)
is called with the same pointer as source and destination. This is
undefined behavior; the strings must not overlap.
Indeed, this is strange.
What do you suggest, remove the entire strcpy() line? It's a no-op
anyway.
Yes, I'd remove it.
--
Jakub Wilk
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org