From bad59e0fca35ba1a30b8483caa77c8c00a2d86bb Mon Sep 17 00:00:00 2001 From: sjplimp Date: Fri, 11 Jan 2013 16:21:15 +0000 Subject: [PATCH] git-svn-id: svn://svn.icms.temple.edu/lammps-ro/trunk@9260 f3b2605a-c512-4ea7-a41b-209d697bcdaa --- src/dump_custom.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dump_custom.cpp b/src/dump_custom.cpp index 5c5c951ee7..b2b9cf04ce 100644 --- a/src/dump_custom.cpp +++ b/src/dump_custom.cpp @@ -210,6 +210,7 @@ void DumpCustom::init_style() for (int i = 0; i < size_one; i++) { if (i == 0) ptr = strtok(format," \0"); else ptr = strtok(NULL," \0"); + if (ptr == NULL) error->all(FLERR,"Dump_modify format string is too short"); delete [] vformat[i]; vformat[i] = new char[strlen(ptr) + 2]; strcpy(vformat[i],ptr);