From 56a076911e04ba0c6e64a071b89ae5853d78f96d Mon Sep 17 00:00:00 2001 From: julie Date: Thu, 22 Oct 2015 05:29:34 +0000 Subject: Fix bug 137 and 138 submitted by Dan Kortschak Applied patch submitted by Dan Kortschak --- LAPACKE/src/lapacke_clantr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'LAPACKE/src/lapacke_clantr.c') diff --git a/LAPACKE/src/lapacke_clantr.c b/LAPACKE/src/lapacke_clantr.c index 36ae5972..fe123cf5 100644 --- a/LAPACKE/src/lapacke_clantr.c +++ b/LAPACKE/src/lapacke_clantr.c @@ -53,7 +53,7 @@ float LAPACKE_clantr( int matrix_layout, char norm, char uplo, char diag, /* Allocate memory for working array(s) */ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) || LAPACKE_lsame( norm, 'O' ) ) { - work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) ); + work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,MAX(m,n)) ); if( work == NULL ) { info = LAPACK_WORK_MEMORY_ERROR; goto exit_level_0; -- cgit v1.2.3