diff --git a/libr/bin/p/bin_elf.inc b/libr/bin/p/bin_elf.inc index db8ee7043c..d12ba62b30 100644 --- a/libr/bin/p/bin_elf.inc +++ b/libr/bin/p/bin_elf.inc @@ -177,7 +177,7 @@ static RList* sections(RBinFile *bf) { RBinSection *ptr = NULL; RList *ret = NULL; - if (!obj || !(ret = r_list_newf (r_bin_section_free))) { + if (!obj || !(ret = r_list_newf ((RListFree)r_bin_section_free))) { return NULL; } //there is not leak in section since they are cached by elf.c diff --git a/libr/core/cmd_print.c b/libr/core/cmd_print.c index c9f1330f90..f90bfc3da0 100644 --- a/libr/core/cmd_print.c +++ b/libr/core/cmd_print.c @@ -4330,14 +4330,17 @@ static int cmd_print(void *data, const char *input) { ret = 0; goto beach; } - char *p = strchr (input, ' '); - if (p) { - int len = (int) r_num_math (core->num, p); - if (len == 0) { - break; - } - use_blocksize = len; + } + char *sp = strchr (input + 1, ' '); + if (!sp && (input[1] == '-' || IS_DIGIT (input[1]))) { + sp = input + 1; + } + if (sp && *sp) { + int n = (int) r_num_math (core->num, r_str_trim_ro (sp)); //input + 1)); + if (!n) { + goto beach; } + use_blocksize = n; } if (core->blocksize_max < use_blocksize && (int) use_blocksize < -core->blocksize_max) {