mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Mackerras <paulus@samba.org>
To: Srinivasa Ds <srinivasa@in.ibm.com>
Cc: linux-kernel@vger.kernel.org, ananth@in.ibm.com,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] Transparently handle <.symbol> lookup for kprobes
Date: Tue, 24 Apr 2007 15:59:45 +1000	[thread overview]
Message-ID: <17965.40145.647933.480761@cargo.ozlabs.ibm.com> (raw)
In-Reply-To: <200704231128.49041.srinivasa@in.ibm.com>

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.

  reply	other threads:[~2007-04-24  6:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-23  5:58 Srinivasa Ds
2007-04-24  5:59 ` Paul Mackerras [this message]
2007-04-24  6:44   ` Srinivasa Ds

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=17965.40145.647933.480761@cargo.ozlabs.ibm.com \
    --to=paulus@samba.org \
    --cc=akpm@linux-foundation.org \
    --cc=ananth@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivasa@in.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®