* [LTP] [PATCH] inode02: fix "slash" array overrun
@ 2013-03-19 14:35 Jan Stancek
2013-03-19 14:58 ` chrubis
0 siblings, 1 reply; 2+ messages in thread
From: Jan Stancek @ 2013-03-19 14:35 UTC (permalink / raw)
To: ltp-list
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];
int increment_name(), get_next_name(), mode(), escrivez(), massmurder();
int max_depth, max_breadth, file_length;
--
1.7.1
------------------------------------------------------------------------------
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] inode02: fix "slash" array overrun
2013-03-19 14:35 [LTP] [PATCH] inode02: fix "slash" array overrun Jan Stancek
@ 2013-03-19 14:58 ` chrubis
0 siblings, 0 replies; 2+ messages in thread
From: chrubis @ 2013-03-19 14:58 UTC (permalink / raw)
To: Jan Stancek; +Cc: ltp-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-19 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-19 14:35 [LTP] [PATCH] inode02: fix "slash" array overrun Jan Stancek
2013-03-19 14:58 ` chrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox