From bf94bf48d284718de3117db3f81e37885a8492d0 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Wed, 9 May 2018 14:16:33 +0200 Subject: [PATCH] Refine error in fsdev_mount_device --- fusee/fusee-secondary/src/fs_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fusee/fusee-secondary/src/fs_dev.c b/fusee/fusee-secondary/src/fs_dev.c index 239fb5638..79f8a69aa 100644 --- a/fusee/fusee-secondary/src/fs_dev.c +++ b/fusee/fusee-secondary/src/fs_dev.c @@ -85,11 +85,11 @@ int fsdev_mount_device(const char *name, unsigned int id) { strcpy(drname, name); strcat(drname, ":"); - if (id >= FF_VOLUMES) { + if (id >= FF_VOLUMES || name[0] == '\0') { errno = EINVAL; return -1; } - if (name[0] == '\0' || strlen(name) > 32) { + if (strlen(name) > 32) { errno = ENAMETOOLONG; return -1; }