Properties plugin: Fix crash when parameter is zero-length string

This seems to be what is provided by the database when length
of path+file name of an entry is larger than MAX_PATH.

Change-Id: Iaf40ce945732a8a8c2e5270a80886dcb537a72be
This commit is contained in:
Christian Soffke 2022-04-12 22:26:16 +02:00 committed by Solomon Peachy
parent 4101aeac54
commit f0a05e0993

View file

@ -313,7 +313,8 @@ enum plugin_status plugin_start(const void* parameter)
int button;
bool quit = false, usb = false;
const char *file = parameter;
if(!parameter) return PLUGIN_ERROR;
if(!parameter || (file[0] != '/')) return PLUGIN_ERROR;
#ifdef HAVE_TOUCHSCREEN
rb->touchscreen_set_mode(rb->global_settings->touch_mode);
#endif