mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-25 08:19:02 +00:00
Fix memory oob problem in test half (#1489)
Allocate memory for argc arguments instead of argc - 1.
This commit is contained in:
@@ -131,8 +131,7 @@ exit:
|
|||||||
static int ParseArgs( int argc, const char **argv )
|
static int ParseArgs( int argc, const char **argv )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
argList = (const char **)calloc( argc - 1, sizeof( char*) );
|
argList = (const char **)calloc(argc, sizeof(char *));
|
||||||
|
|
||||||
if( NULL == argList )
|
if( NULL == argList )
|
||||||
{
|
{
|
||||||
vlog_error( "Failed to allocate memory for argList.\n" );
|
vlog_error( "Failed to allocate memory for argList.\n" );
|
||||||
|
|||||||
Reference in New Issue
Block a user