RevolutionPi / piControl

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

piControl:flat: handle missing config settings #44

Closed linosanfilippo-kunbus closed 2 years ago

linosanfilippo-kunbus commented 2 years ago

In case that the file config.rsc could not be read (e.g. since it does not exist), the piDev_g.ent pointer which points to the settings extracted from this file, is NULL. Since function revpi_set_defaults() is not prepared for this situation it causes a NULL pointer access in this case. Fix this by checking piDev_g.ent for NULL before calling revpi_set_defaults().

Signed-off-by: Lino Sanfilippo l.sanfilippo@kunbus.com