diff options
author | Dan Carpenter <error27@gmail.com> | 2010-07-10 06:06:44 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2010-07-22 14:56:41 -0400 |
commit | 24a461d537f49f9da6533d83100999ea08c6c755 (patch) | |
tree | b7aa6258df988a64d802eff0b15e92c394742a2e /kernel | |
parent | a484e54fae891703cbe1c9ec1b536605f11f5482 (diff) |
trace: strlen() return doesn't account for the NULL
We need to add one to the strlen() return because of the NULL
character. The type->name here generally comes from the kernel and I
don't think any of them come close to being MAX_TRACER_SIZE (100)
characters long so this is basically a cleanup.
Signed-off-by: Dan Carpenter <error27@gmail.com>
LKML-Reference: <20100710100644.GV19184@bicker>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/trace/trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index f7488f44d26b..cacb6f083ecb 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -739,7 +739,7 @@ __acquires(kernel_lock) | |||
739 | return -1; | 739 | return -1; |
740 | } | 740 | } |
741 | 741 | ||
742 | if (strlen(type->name) > MAX_TRACER_SIZE) { | 742 | if (strlen(type->name) >= MAX_TRACER_SIZE) { |
743 | pr_info("Tracer has a name longer than %d\n", MAX_TRACER_SIZE); | 743 | pr_info("Tracer has a name longer than %d\n", MAX_TRACER_SIZE); |
744 | return -1; | 744 | return -1; |
745 | } | 745 | } |