fix possible uninitialized data access with pppm and pppm/disp

This commit is contained in:
Axel Kohlmeyer
2017-07-12 18:14:11 -04:00
parent 01e848387a
commit c24fca61f3
2 changed files with 12 additions and 0 deletions

View File

@ -95,6 +95,11 @@ PPPM::PPPM(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
MPI_Comm_rank(world,&me);
MPI_Comm_size(world,&nprocs);
nfft_both = 0;
nxhi_in = nxlo_in = nxhi_out = nxlo_out = 0;
nyhi_in = nylo_in = nyhi_out = nylo_out = 0;
nzhi_in = nzlo_in = nzhi_out = nzlo_out = 0;
density_brick = vdx_brick = vdy_brick = vdz_brick = NULL;
density_fft = NULL;
u_brick = NULL;

View File

@ -121,6 +121,13 @@ PPPMDisp::PPPMDisp(LAMMPS *lmp, int narg, char **arg) : KSpace(lmp, narg, arg),
MPI_Comm_rank(world,&me);
MPI_Comm_size(world,&nprocs);
nfft_both = nfft_both_6 = 0;
nxhi_in = nxlo_in = nxhi_out = nxlo_out = 0;
nyhi_in = nylo_in = nyhi_out = nylo_out = 0;
nzhi_in = nzlo_in = nzhi_out = nzlo_out = 0;
nxhi_in_6 = nxlo_in_6 = nxhi_out_6 = nxlo_out_6 = 0;
nyhi_in_6 = nylo_in_6 = nyhi_out_6 = nylo_out_6 = 0;
nzhi_in_6 = nzlo_in_6 = nzhi_out_6 = nzlo_out_6 = 0;
csumflag = 0;
B = NULL;