summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Soffke <christian.soffke@gmail.com>2022-04-12 22:26:16 +0200
committerSolomon Peachy <pizza@shaftnet.org>2022-08-04 14:40:59 -0400
commitf0a05e099337e88afe99ad0cad561caff96e48aa (patch)
treec715a1a24a371465ac35fdb61056e6d0686b8784
parent4101aeac54ded9591c52ac03a1b765afc394d6c0 (diff)
downloadrockbox-f0a05e099337e88afe99ad0cad561caff96e48aa.tar.gz
rockbox-f0a05e099337e88afe99ad0cad561caff96e48aa.zip
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
-rw-r--r--apps/plugins/properties.c3
1 files changed, 2 insertions, 1 deletions
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)
313 int button; 313 int button;
314 bool quit = false, usb = false; 314 bool quit = false, usb = false;
315 const char *file = parameter; 315 const char *file = parameter;
316 if(!parameter) return PLUGIN_ERROR; 316 if(!parameter || (file[0] != '/')) return PLUGIN_ERROR;
317
317#ifdef HAVE_TOUCHSCREEN 318#ifdef HAVE_TOUCHSCREEN
318 rb->touchscreen_set_mode(rb->global_settings->touch_mode); 319 rb->touchscreen_set_mode(rb->global_settings->touch_mode);
319#endif 320#endif