aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/print_binary.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2020-10-13 13:02:20 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-10-13 13:02:20 -0300
commitdbaa1b3d9afba3c050d365245a36616ae3f425a7 (patch)
tree5fc6bea725975062bfa6e818205685ecf85cfb78 /tools/perf/util/print_binary.c
parenta41c32105cc12a7d2ae11a591929a6add98987cd (diff)
parentbef69bd7cfc363ab94b84ea29102f3e913ed3c6c (diff)
Merge branch 'perf/urgent' into perf/core
To pick fixes that missed v5.9. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
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;
}