From f54ff6ad5d7215b2c43ca02f19a3d7ca4443424f Mon Sep 17 00:00:00 2001 From: Vitaliy Filippov Date: Fri, 10 Dec 2021 12:27:25 +0300 Subject: [PATCH] Do not crash in simple-offsets when some options are empty, too --- src/cli_create.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cli_create.cpp b/src/cli_create.cpp index 8c343b8c..36f9daa4 100644 --- a/src/cli_create.cpp +++ b/src/cli_create.cpp @@ -465,6 +465,10 @@ resume_3: uint64_t parse_size(std::string size_str) { + if (!size_str.length()) + { + return 0; + } uint64_t mul = 1; char type_char = tolower(size_str[size_str.length()-1]); if (type_char == 'k' || type_char == 'm' || type_char == 'g' || type_char == 't')