From: Dmitry V. Levin Date: Tue, 20 Dec 2016 20:19:35 +0000 (+0000) Subject: tests: check decoding of unreadable ip_mreq and ipv6_mreq structures X-Git-Tag: v4.16~311 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1eef9d28c723dc3aa62345ad0857b0f03f80f885;p=strace tests: check decoding of unreadable ip_mreq and ipv6_mreq structures * tests/ip_mreq.c (main): Check short read. --- diff --git a/tests/ip_mreq.c b/tests/ip_mreq.c index 19e8b87c..fa0c504b 100644 --- a/tests/ip_mreq.c +++ b/tests/ip_mreq.c @@ -102,6 +102,13 @@ main(void) short_any[i].str_level, short_any[i].str_optname, * (unsigned char *) short_any[i].optval, sprintrc(rc)); + + rc = setsockopt(0, short_any[i].level, short_any[i].optname, + short_any[i].optval + 1, short_any[i].optsize); + printf("setsockopt(0, %s, %s, %p, %u) = %s\n", + short_any[i].str_level, short_any[i].str_optname, + short_any[i].optval + 1, short_any[i].optsize, + sprintrc(rc)); } struct {