Merge pull request #170 from sehugg/main

Fixed stack-use-after-return bug found with -fsanitize=address,undefined
This commit is contained in:
drmortalwombat 2024-11-01 22:37:25 +01:00 committed by GitHub
commit 6576f4d090
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -553,8 +553,8 @@ int main2(int argc, const char** argv)
strftime(dstring, sizeof(tstring) - 1, "\"%b %d %Y\"", &t); strftime(dstring, sizeof(tstring) - 1, "\"%b %d %Y\"", &t);
strftime(tstring, sizeof(dstring) - 1, "\"%H:%M:%S\"", &t); strftime(tstring, sizeof(dstring) - 1, "\"%H:%M:%S\"", &t);
compiler->AddDefine(Ident::Unique("__DATE__"), dstring); compiler->AddDefine(Ident::Unique("__DATE__"), _strdup(dstring));
compiler->AddDefine(Ident::Unique("__TIME__"), tstring); compiler->AddDefine(Ident::Unique("__TIME__"), _strdup(tstring));
} }
// Add runtime module // Add runtime module