A message system like D-Bus for Liminix, taken from OpenWRT's ubus
Find a file
Petr Štetiar a995b1e681 lua: workaround false positive dereference of null pointer
scan-build from clang-9 has reported following:

 ubus.c:837:16: warning: Access to field 'rnotify' results in a dereference of a null pointer (loaded from variable 'sub')
                 sub->rnotify = luaL_ref(L, -2);

Which is false positive as the lua_error() does a long jump and
therefore never returns and this long jump probably confuses the static
analyzer. So this patch workarounds this false positive by helping
static analyzer by using common Lua idiom which is to return
lua_error()'s return value.

Ref: https://www.lua.org/manual/5.1/manual.html#lua_error
Addresses-Coverity-ID: 1412355 ("Dereference after null check")
Signed-off-by: Petr Štetiar <ynezz@true.cz>
2019-12-16 23:39:16 +01:00
examples examples: remove dead increments 2019-12-16 23:39:16 +01:00
lua lua: workaround false positive dereference of null pointer 2019-12-16 23:39:16 +01:00
tests add fuzzer and cram based unit tests 2019-12-16 23:39:16 +01:00
.gitignore examples: split client/server code 2012-10-24 14:37:57 +02:00
.gitlab-ci.yml add initial GitLab CI support 2019-12-16 23:39:16 +01:00
cli.c iron out all extra compiler warnings 2019-12-16 23:39:16 +01:00
CMakeLists.txt add fuzzer and cram based unit tests 2019-12-16 23:39:16 +01:00
libubus-acl.c iron out all extra compiler warnings 2019-12-16 23:39:16 +01:00
libubus-internal.h refactor ubusd.c into reusable ubusd_library 2019-12-16 23:39:16 +01:00
libubus-io.c refactor ubusd.c into reusable ubusd_library 2019-12-16 23:39:16 +01:00
libubus-obj.c libubus: check for non-NULL data before running callbacks 2018-07-25 10:45:34 +02:00
libubus-req.c iron out all extra compiler warnings 2019-12-16 23:39:16 +01:00
libubus-sub.c libubus: fix passing the return code of the subscriber callback to the notifier 2013-03-17 18:29:38 +01:00
libubus.c libubus: fix incompatible pointer types assigment 2019-12-16 23:39:16 +01:00
libubus.h libubus-req: add data_cb callback handling for ubus notifications 2017-11-06 08:23:08 +01:00
ubus_common.h ubusd_event: move strmatch_len to ubus_common.h 2018-10-06 20:39:03 +02:00
ubusd.c refactor ubusd.c into reusable ubusd_library 2019-12-16 23:39:16 +01:00
ubusd.h refactor ubusd.c into reusable ubusd_library 2019-12-16 23:39:16 +01:00
ubusd_acl.c iron out all extra compiler warnings 2019-12-16 23:39:16 +01:00
ubusd_acl.h ubusd_acl: event send access list support 2018-10-06 20:40:24 +02:00
ubusd_event.c iron out all extra compiler warnings 2019-12-16 23:39:16 +01:00
ubusd_id.c ubusd: use avl_strcmp 2012-12-11 23:38:00 +01:00
ubusd_id.h add copyright/license information 2011-06-17 16:35:11 +02:00
ubusd_main.c refactor ubusd.c into reusable ubusd_library 2019-12-16 23:39:16 +01:00
ubusd_monitor.c ubusd_monitor: alloc & free the buffer outside of the loop 2017-11-13 09:57:55 +01:00
ubusd_obj.c iron out all extra compiler warnings 2019-12-16 23:39:16 +01:00
ubusd_obj.h pass ubus_msg_buf to callback of internal object 2015-06-18 19:01:17 +02:00
ubusd_proto.c ubusd: move global retmsg per client 2017-11-13 10:09:28 +01:00
ubusmsg.h ubusd: add monitor support 2015-11-19 22:32:11 +01:00