Commit 31064623 authored by Ryan Gonzalez's avatar Ryan Gonzalez Committed by Mike Wey

Fix an out-of-bounds write in toStringzArray (#248)

parent 5d99cc20
......@@ -1192,7 +1192,7 @@ code: start
{
return null;
}
char** argv = (new char*[args.length]).ptr;
char** argv = (new char*[args.length + 1]).ptr;
int argc = 0;
foreach (string p; args)
{
......@@ -1210,7 +1210,7 @@ code: start
{
return null;
}
char**[] argv = new char**[args.length];
char**[] argv = new char**[args.length + 1];
int argc = 0;
foreach( string[] p; args )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment