Fix memory oob problem in test half (#1489)

Allocate memory for argc arguments
instead of argc - 1.
This commit is contained in:
niranjanjoshi121
2022-09-20 21:23:34 +05:30
committed by GitHub
parent 8f9c1960ff
commit 76bd9d3674

View File

@@ -131,8 +131,7 @@ exit:
static int ParseArgs( int argc, const char **argv )
{
int i;
argList = (const char **)calloc( argc - 1, sizeof( char*) );
argList = (const char **)calloc(argc, sizeof(char *));
if( NULL == argList )
{
vlog_error( "Failed to allocate memory for argList.\n" );