[PATCH v2] powerpc/kprobes: refactor kprobe_lookup_name for safer string operations

David Laight David.Laight at ACULAB.COM
Fri May 5 01:50:06 AEST 2017


From: Paul Clarke
> Sent: 04 May 2017 16:07
...
> > +	if ((c = strnchr(name, MODULE_NAME_LEN, ':')) != NULL) {
> 
> Shouldn't this be MODULE_NAME_LEN + 1, since the ':' can come after a module name of length
> MODULE_NAME_LEN?

No, because MODULE_NAME_LEN includes the terminating '\0'.

	David



More information about the Linuxppc-dev mailing list