aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/print_binary.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-12-11 17:48:50 +0000
committerMark Brown <broonie@kernel.org>2020-12-11 17:48:50 +0000
commit58f7553fa424fd0fd74e8b796d50c66014cebebe (patch)
tree8aecb1d047b1df2abbfa1ef323d2a724a6a61c77 /tools/perf/util/print_binary.c
parentMerge remote-tracking branch 'spi/for-5.9' into spi-linus (diff)
parentspi: Limit the spi device max speed to controller's max speed (diff)
downloadlinux-58f7553fa424fd0fd74e8b796d50c66014cebebe.tar.gz
linux-58f7553fa424fd0fd74e8b796d50c66014cebebe.zip
Merge remote-tracking branch 'spi/for-5.10' into spi-linus
Diffstat (limited to 'tools/perf/util/print_binary.c')
-rw-r--r--tools/perf/util/print_binary.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/print_binary.c b/tools/perf/util/print_binary.c
index 599a1543871d..13fdc51c61d9 100644
--- a/tools/perf/util/print_binary.c
+++ b/tools/perf/util/print_binary.c
@@ -50,7 +50,7 @@ int is_printable_array(char *p, unsigned int len)
len--;
- for (i = 0; i < len; i++) {
+ for (i = 0; i < len && p[i]; i++) {
if (!isprint(p[i]) && !isspace(p[i]))
return 0;
}