Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bla_omatcopy: check ldb < cols for transposed matrix copy #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frame/compat/bla_omatcopy.c
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ static dim_t bli_soMatCopy_ct(dim_t rows,dim_t cols,const float alpha,const floa
dim_t i,j;
const float* aptr;
float* bptr;
if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < rows )
if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < cols )
//if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < cols || ldb < rows )
{
bli_print_msg( " Invalid function parameter in bli_soMatCopy_ct() .", __FILE__, __LINE__ );
Expand Down Expand Up @@ -531,7 +531,7 @@ static dim_t bli_doMatCopy_ct(dim_t rows,dim_t cols,const double alpha,const dou
dim_t i,j;
const double* aptr;
double* bptr;
if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < rows )
if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < cols )
{
bli_print_msg( " Invalid function parameter in bli_doMatCopy_ct() .", __FILE__, __LINE__ );
AOCL_DTL_TRACE_EXIT_ERR(AOCL_DTL_LEVEL_TRACE_2, "Invalid function parameters");
Expand Down Expand Up @@ -589,7 +589,7 @@ static dim_t bli_coMatCopy_ct(dim_t rows,dim_t cols,const scomplex alpha,const s
const scomplex* aptr;
scomplex* bptr;

if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < rows )
if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < cols )
{
bli_print_msg( " Invalid function parameter in bli_coMatCopy_ct() .", __FILE__, __LINE__ );
AOCL_DTL_TRACE_EXIT_ERR(AOCL_DTL_LEVEL_TRACE_2, "Invalid function parameters");
Expand Down Expand Up @@ -647,7 +647,7 @@ static dim_t bli_zoMatCopy_ct(dim_t rows,dim_t cols,const dcomplex alpha,const d
dim_t i,j;
const dcomplex* aptr;
dcomplex* bptr;
if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < rows )
if ( rows <= 0 || cols <= 0 || a == NULL || b == NULL || lda < rows || ldb < cols )
{
bli_print_msg( " Invalid function parameter in bli_zoMatCopy_ct() .", __FILE__, __LINE__ );
AOCL_DTL_TRACE_EXIT_ERR(AOCL_DTL_LEVEL_TRACE_2, "Invalid function parameters");
Expand Down