Skip to content
Snippets Groups Projects
Commit d6253466 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

correct potential out-of-bounds memory access

parent d00908ea
No related branches found
No related tags found
No related merge requests found
...@@ -700,7 +700,7 @@ void FixQEq::read_file(char *file) ...@@ -700,7 +700,7 @@ void FixQEq::read_file(char *file)
int ntypes = atom->ntypes; int ntypes = atom->ntypes;
int *setflag = new int[ntypes+1]; int *setflag = new int[ntypes+1];
for (i=0; i < params_per_line; ++i) setflag[i] = 0; for (i=0; i <= ntypes; ++i) setflag[i] = 0;
memory->create(chi,ntypes+1,"qeq:chi"); memory->create(chi,ntypes+1,"qeq:chi");
memory->create(eta,ntypes+1,"qeq:eta"); memory->create(eta,ntypes+1,"qeq:eta");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment