From f0a05e099337e88afe99ad0cad561caff96e48aa Mon Sep 17 00:00:00 2001 From: Christian Soffke Date: Tue, 12 Apr 2022 22:26:16 +0200 Subject: [PATCH] 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 --- apps/plugins/properties.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/plugins/properties.c b/apps/plugins/properties.c index e5f00e307b..c4378a0356 100644 --- a/apps/plugins/properties.c +++ b/apps/plugins/properties.c @@ -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