[OpenWrt-Devel] [PATCH libubox 9/9] avl: guard against theoretical null pointer dereference

Petr Štetiar ynezz at true.cz
Wed Nov 20 16:29:35 EST 2019

Yousong Zhou <yszhou4tech at gmail.com> [2019-11-20 22:01:22]:

> By the way, will assert(node-parent != NULL) suffice to inform the
> analyzer the underlying details?  If it does, we could also apply it
> to b64_encode(), b64_decode().

BTW in libnl-tiny I've learned, that using assert() in CMake release builds
needs fiddling with C flags as CMake adds -DNDEBUG to release build C flags
which in turn disable assert().

Anyway, I agree, that crashing with invalid inputs is the proper way, so I've
reworked it with assert() as it works for analyzer as well.

-- ynezz

openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list