Commit d6253466 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

correct potential out-of-bounds memory access

parent d00908ea
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -700,7 +700,7 @@ void FixQEq::read_file(char *file)

  int ntypes = atom->ntypes;
  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(eta,ntypes+1,"qeq:eta");