Skip to content

Commit

Permalink
fix another int32 overflow for vhf
Browse files Browse the repository at this point in the history
  • Loading branch information
sunqm committed Mar 9, 2015
1 parent d050259 commit 41dd083
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/vhf/nr_direct.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ static void filldot_kgtl(int (*intor)(), void (*funpack)(), int (*fill)(),
struct _VHFEnvs *envs)
{
const int nao = envs->nao;
const int nao2 = nao * nao;
const size_t nao2 = nao * nao;
const int kloc = envs->ao_loc[ksh];
const int lloc = envs->ao_loc[lsh];
const int dk = envs->ao_loc[ksh+1] - kloc;
Expand Down Expand Up @@ -316,12 +316,13 @@ static void filldot_keql(int (*intor)(), void (*funpack)(), int (*fill)(),
struct _VHFEnvs *envs)
{
const int nao = envs->nao;
const int nao2 = nao * nao;
const size_t nao2 = nao * nao;
const int kloc = envs->ao_loc[ksh];
const int lloc = envs->ao_loc[lsh];
const int dk = envs->ao_loc[ksh+1] - kloc;
const int dl = envs->ao_loc[lsh+1] - lloc;
int k, l, k0, l0, ieri, idm, off;
int k, l, k0, l0, ieri, idm;
size_t off;
double *eri = malloc(sizeof(double)*dk*dl*nao2*ncomp);
double *peri;
double *dm;
Expand Down

0 comments on commit 41dd083

Please sign in to comment.