mirror of
https://github.com/troglobit/finit.git
synced 2026-11-28 20:58:24 +00:00
Merge pull request #495 from aanderse/cond/bufferlen
This commit is contained in:
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -206,7 +206,7 @@ static void cond_bump_reconf(void)
|
|||||||
|
|
||||||
static int cond_checkpath(const char *path)
|
static int cond_checkpath(const char *path)
|
||||||
{
|
{
|
||||||
char buf[MAX_ARG_LEN], *dir;
|
char buf[MAX_COND_LEN + sizeof(_PATH_COND)], *dir;
|
||||||
|
|
||||||
strlcpy(buf, path, sizeof(buf));
|
strlcpy(buf, path, sizeof(buf));
|
||||||
dir = dirname(buf);
|
dir = dirname(buf);
|
||||||
|
|||||||
+1
-1
@@ -47,7 +47,7 @@ const char *condstr(enum cond_state s)
|
|||||||
const char *cond_path(const char *name)
|
const char *cond_path(const char *name)
|
||||||
{
|
{
|
||||||
static char path[256];
|
static char path[256];
|
||||||
char tmp[MAX_ARG_LEN];
|
char tmp[MAX_COND_LEN + sizeof(_PATH_COND)];
|
||||||
|
|
||||||
snprintf(tmp, sizeof(tmp), _PATH_COND "%s", name);
|
snprintf(tmp, sizeof(tmp), _PATH_COND "%s", name);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user