strlen() does not include the \0.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
unsigned int size;
char *comm = comm_event->task->comm;
- size = ALIGN(strlen(comm), sizeof(u64));
+ size = ALIGN(strlen(comm)+1, sizeof(u64));
comm_event->comm = comm;
comm_event->comm_size = size;
}
got_name:
- size = ALIGN(strlen(name), sizeof(u64));
+ size = ALIGN(strlen(name)+1, sizeof(u64));
mmap_event->file_name = name;
mmap_event->file_size = size;