diff options
author | Christian Soffke <christian.soffke@gmail.com> | 2022-04-12 22:26:16 +0200 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2022-08-04 14:40:59 -0400 |
commit | f0a05e099337e88afe99ad0cad561caff96e48aa (patch) | |
tree | c715a1a24a371465ac35fdb61056e6d0686b8784 /apps/plugins/properties.c | |
parent | 4101aeac54ded9591c52ac03a1b765afc394d6c0 (diff) | |
download | rockbox-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
Diffstat (limited to 'apps/plugins/properties.c')
-rw-r--r-- | apps/plugins/properties.c | 3 |
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 |