From: chrubis@suse.cz
To: Jan Stancek <jstancek@redhat.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] inode02: fix "slash" array overrun
Date: Tue, 19 Mar 2013 15:58:35 +0100 [thread overview]
Message-ID: <20130319145835.GA11291@rei> (raw)
In-Reply-To: <df80cf17650d9280457b66e44fb09b55c1cdbce4.1363703473.git.jstancek@redhat.com>
Hi!
> testcases/kernel/fs/inode/inode02.c:254 is initializing it as:
> slash[0] = '/';
> slash[1] = '\0';
>
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
> testcases/kernel/fs/inode/inode02.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/testcases/kernel/fs/inode/inode02.c b/testcases/kernel/fs/inode/inode02.c
> index 783edf8..f70c5d8 100644
> --- a/testcases/kernel/fs/inode/inode02.c
> +++ b/testcases/kernel/fs/inode/inode02.c
> @@ -80,7 +80,7 @@ int nchild;
> FILE *list_stream = NULL;
> int list_id;
> int file_id;
> -char slash[1];
> +char slash[2];
Good catch, but could you go ahead and convert the strcats into one
snprintf() so that the slash array wouldn't be needed at all?
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
prev parent reply other threads:[~2013-03-19 14:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-19 14:35 [LTP] [PATCH] inode02: fix "slash" array overrun Jan Stancek
2013-03-19 14:58 ` chrubis [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=20130319145835.GA11291@rei \
--to=chrubis@suse.cz \
--cc=jstancek@redhat.com \
--cc=ltp-list@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.