mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +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 )
|
||||
{
|
||||
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" );
|
||||
|
||||
Reference in New Issue
Block a user