diff --git a/src/shell/commands/data_operations.cpp b/src/shell/commands/data_operations.cpp index b9dad86f38..3ce7540ecd 100644 --- a/src/shell/commands/data_operations.cpp +++ b/src/shell/commands/data_operations.cpp @@ -2430,7 +2430,7 @@ void escape_sds_argv(int argc, sds *argv) { for (int i = 0; i < argc; i++) { const size_t dest_len = sdslen(argv[i]) * 4 + 1; // Maximum possible expansion - sds new_arg = sdsnewlen("", dest_len); + sds new_arg = sdsnewlen(NULL, dest_len); pegasus::utils::c_escape_string(argv[i], sdslen(argv[i]), new_arg, dest_len); sdsfree(argv[i]); argv[i] = new_arg;