From: Jonathan Cameron <jic23@cam.ac.uk>
To: Barry Song <21cnbao@gmail.com>
Cc: gregkh@suse.de, linux-iio@vger.kernel.org
Subject: Re: [PATCH v3] iio-utils: fix memory overflow for dynamically allocateded memory to hold filename
Date: Tue, 25 May 2010 11:07:25 +0100 [thread overview]
Message-ID: <4BFBA15D.2040607@cam.ac.uk> (raw)
In-Reply-To: <1274780404-17963-1-git-send-email-21cnbao@gmail.com>
On 05/25/10 10:40, Barry Song wrote:
> Signed-off-by: Barry Song <21cnbao@gmail.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Thanks Barry!
> ---
> drivers/staging/iio/Documentation/iio_utils.h | 3 +--
> 1 files changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h
> index a4555e6..014f668 100644
> --- a/drivers/staging/iio/Documentation/iio_utils.h
> +++ b/drivers/staging/iio/Documentation/iio_utils.h
> @@ -62,9 +62,8 @@ inline int find_type_by_name(const char *name, const char *type)
> 1) != 0) {
> filename = malloc(strlen(iio_dir)
> + strlen(type)
> - + 1
> + numstrlen
> - + 1);
> + + 6);
> if (filename == NULL)
> return -ENOMEM;
> sprintf(filename, "%s%s%d/name",
prev parent reply other threads:[~2010-05-25 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-25 9:40 [PATCH v3] iio-utils: fix memory overflow for dynamically allocateded memory to hold filename Barry Song
2010-05-25 10:07 ` Jonathan Cameron [this message]
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=4BFBA15D.2040607@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=21cnbao@gmail.com \
--cc=gregkh@suse.de \
--cc=linux-iio@vger.kernel.org \
/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