From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/2] llistxattr: added a new test case to llistxattr02
Date: Tue, 11 Oct 2016 11:51:56 +0200 [thread overview]
Message-ID: <20161011095156.GB14295@rei.lan> (raw)
In-Reply-To: <1476114001-24856-2-git-send-email-dejan.jovicevic@rt-rk.com>
Hi!
> static void verify_llistxattr(unsigned int n)
> @@ -95,6 +101,9 @@ static void setup(void)
> tst_brk(TBROK | TERRNO, "lsetxattr() failed");
> }
> }
> +
> + memset(&longpathname, 'a', sizeof(longpathname) - 1);
> + longpathname[sizeof(longpathname)] = '\0';
This is off-by-one, the last array element is at sizeof(longpathname)-1.
Also this is not needed since the array is global, hence initialized to
0 and we fill first n-1 elements with the memset() leaving the last one
to be the '\0'.
> }
>
> static struct tst_test test = {
> --
> 1.9.1
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2016-10-11 9:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-10 15:39 [LTP] [PATCH v2 0/2] Listxattr related calls: new tests and testcase Dejan Jovicevic
2016-10-10 15:40 ` [LTP] [PATCH v2 1/2] llistxattr: added a new test case to llistxattr02 Dejan Jovicevic
2016-10-11 9:51 ` Cyril Hrubis [this message]
2016-10-10 15:40 ` [LTP] [PATCH v2 2/2] flistxattr and listxattr: added tests Dejan Jovicevic
2016-10-11 10:38 ` Cyril Hrubis
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=20161011095156.GB14295@rei.lan \
--to=chrubis@suse.cz \
--cc=ltp@lists.linux.it \
/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