use snprintf() in a bunch of cases to avoid overflowing fixed size buffers with unchecked strings
This commit is contained in:
@ -121,6 +121,7 @@ void Memory::sfree(void *ptr)
|
||||
void Memory::fail(const char *name)
|
||||
{
|
||||
char str[128];
|
||||
sprintf(str,"Cannot create/grow a vector/array of pointers for %s",name);
|
||||
snprintf(str,128,
|
||||
"Cannot create/grow a vector/array of pointers for %s",name);
|
||||
error->one(FLERR,str);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user