mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 11:48:50 +00:00
lib: frrscript_call check name before decode
Signed-off-by: Donald Lee <dlqs@gmx.com>
This commit is contained in:
parent
7948c5d27a
commit
24ff8520af
@ -123,7 +123,12 @@ void frrscript_init(const char *scriptdir);
|
||||
#define DECODE_ARGS(name, value) \
|
||||
do { \
|
||||
lua_getfield(lfs->L, 1, name); \
|
||||
DECODE_ARGS_WITH_STATE(lfs->L, value); \
|
||||
if (lua_isnil(lfs->L, 2)) { \
|
||||
lua_pop(lfs->L, 1); \
|
||||
} else { \
|
||||
DECODE_ARGS_WITH_STATE(lfs->L, value); \
|
||||
} \
|
||||
assert(lua_gettop(lfs->L) == 1); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user