[Issue 10338] New: Bug in link.c:107
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Jun 11 13:06:29 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10338
Summary: Bug in link.c:107
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: maxim at maxim-fomin.ru
--- Comment #0 from Maxim Fomin <maxim at maxim-fomin.ru> 2013-06-11 13:06:28 PDT ---
>From link.c:
int findNoMainError(int fd)
{
static const char nmeErrorMessage[] =
#if __APPLE__
"\"__Dmain\", referenced from:"
#else
"undefined reference to `_Dmain'"
#endif
;
FILE *stream = fdopen(fd, "r");
if (stream == NULL) return -1;
const size_t len = 64 * 1024 - 1;
char buffer[len + 1]; // + '\0'
size_t beg = 0, end = len;
Buffer is object of automatic lifetime, and it is not initialized, hence it
effectively contains 64 garbage from stack, which may potentially corrupt data.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list