Bug 820652 (part 7) - DMD: Fix bug in strdup_. r=jlebar.

--HG--
extra : rebase_source : d15a08687b465c9c63c8a3786fdc7ba2539f2b82
This commit is contained in:
Nicholas Nethercote 2012-12-12 21:57:23 -08:00
parent be93835e35
commit f68111e9de

View File

@ -124,7 +124,7 @@ public:
static char* strdup_(const char* aStr)
{
char* s = (char*) gMallocTable->malloc(strlen(aStr));
char* s = (char*) gMallocTable->malloc(strlen(aStr) + 1);
ExitOnFailure(s);
strcpy(s, aStr);
return s;