diff options
Diffstat (limited to 'src/common/utils.c')
-rw-r--r-- | src/common/utils.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/utils.c b/src/common/utils.c index 0d76a885e..44f3087c3 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -2,7 +2,7 @@ * This file is part of Hercules. * http://herc.ws - http://github.com/HerculesWS/Hercules * - * Copyright (C) 2012-2016 Hercules Dev Team + * Copyright (C) 2012-2018 Hercules Dev Team * Copyright (C) Athena Dev Teams * * Hercules is free software: you can redistribute it and/or modify @@ -216,7 +216,7 @@ void findfile(const char *p, const char *pat, void (func)(const char*)) if (strcmp(entry->d_name, "..") == 0) continue; - sprintf(tmppath,"%s%c%s",path, PATHSEP, entry->d_name); + safesnprintf(tmppath, sizeof(tmppath), "%s%c%s", path, PATHSEP, entry->d_name); // check if the pattern matches. if (strstr(entry->d_name, pattern)) { |