net: lwm2m: registry: Validate value pointer before use
Check if value pointer is not NULL before passing it to memcmp() inside
lwm2m_engine_set(). As the function actually expects that the value
pointer can be NULL in case resource value is cleared (there is a test
case for such behavior), validate that len value is actually 0 if NULL
value is provided, to avoid unexpected behavior in other parts of the
function.
Signed-off-by:
Robert Lubos <robert.lubos@nordicsemi.no>
Loading
Please sign in to comment