RevolutionPi / piControl

Kernel module for data exchange with RevPi I/O-Modules and Gateways
81 stars 24 forks source link

piControl:flat: check for valid cofniguration data #22

Closed linosanfilippo-kunbus closed 4 years ago

linosanfilippo-kunbus commented 4 years ago

In revpi_flat_adjust_config() the list of devices that has been found by parsing the configuration file is iterated. However in case of an errorneous or not exising configuration file the pointer that points to this list may be NULL. Skip the device list iteration in this case to avoid a NULL pointer dereference.

Reported-by: Simon Han z.han@kunbus.de Signed-off-by: Lino Sanfilippo l.sanfilippo@kunbus.com