diff options
| author | Donald Lee <dlqs@gmx.com> | 2021-07-29 05:41:09 +0800 |
|---|---|---|
| committer | Donald Lee <dlqs@gmx.com> | 2021-07-29 05:52:22 +0800 |
| commit | 9e3a277b0442861482a2dae9070fb5a1dd887aeb (patch) | |
| tree | 63d2e722c2f38910917d4853343cb5bc30088fcf /lib/frrscript.c | |
| parent | 84c92002d25b7a498f9210356874dbe45a306e8a (diff) | |
lib: Fix condition for snprintf
Signed-off-by: Donald Lee <dlqs@gmx.com>
Diffstat (limited to 'lib/frrscript.c')
| -rw-r--r-- | lib/frrscript.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/frrscript.c b/lib/frrscript.c index 3e1e184bc6..d00b84ccbb 100644 --- a/lib/frrscript.c +++ b/lib/frrscript.c @@ -276,7 +276,7 @@ int frrscript_load(struct frrscript *fs, const char *function_name, if (snprintf(script_name, sizeof(script_name), "%s/%s.lua", scriptdir, fs->name) - < 0) { + >= (int)sizeof(script_name)) { zlog_err("frrscript: path to script %s/%s.lua is too long", scriptdir, fs->name); goto fail; |
