lkml.org 
[lkml]   [2007]   [Apr]   [24]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 24 Apr 2007 15:59:45 +1000
FromPaul Mackerras <>
SubjectRe: [PATCH] Transparently handle <.symbol> lookup for kprobes
Srinivasa Ds writes:

> +	} else {							\
> +		char dot_name[KSYM_NAME_LEN+1];				\
> +		dot_name[0] = '.';					\
> +		dot_name[1] = '\0';					\
> +		strncat(dot_name, name, KSYM_NAME_LEN);			\

Assuming the kernel strncat works like the userspace one does, there
is a possibility that dot_name[] won't be properly null-terminated
here.  If strlen(name) >= KSYM_NAME_LEN-1, then strncat will set
dot_name[KSYM_NAME_LEN-1] to something non-null and won't touch
dot_name[KSYM_NAME_LEN].

Paul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-04-24 08:03    [from the cache]
©2003-2008