summaryrefslogtreecommitdiff
path: root/drivers/fastboot/fb_getvar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/fastboot/fb_getvar.c')
-rw-r--r--drivers/fastboot/fb_getvar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index dd3475e0a8b..8cb8ffa2c6c 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -12,6 +12,7 @@
#include <fs.h>
#include <part.h>
#include <version.h>
+#include <linux/printk.h>
static void getvar_version(char *var_parameter, char *response);
static void getvar_version_bootloader(char *var_parameter, char *response);
@@ -183,7 +184,7 @@ static void __maybe_unused getvar_has_slot(char *part_name, char *response)
/* part_name_wslot = part_name + "_a" */
len = strlcpy(part_name_wslot, part_name, PART_NAME_LEN - 3);
- if (len > PART_NAME_LEN - 3)
+ if (len >= PART_NAME_LEN - 3)
goto fail;
strcat(part_name_wslot, "_a");