From: deraadt Date: Thu, 2 Sep 2021 09:46:21 +0000 (+0000) Subject: delete %n using test cases, which now intentionally fault X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e7277155d40e32499ad52cd47be1ceb60122b00c;p=openbsd delete %n using test cases, which now intentionally fault spotted by anton --- diff --git a/regress/lib/libc/sprintf/sprintf_test.c b/regress/lib/libc/sprintf/sprintf_test.c index 61c58f2f09d..0cdd1709112 100644 --- a/regress/lib/libc/sprintf/sprintf_test.c +++ b/regress/lib/libc/sprintf/sprintf_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sprintf_test.c,v 1.4 2004/09/18 19:31:32 otto Exp $ */ +/* $OpenBSD: sprintf_test.c,v 1.5 2021/09/02 09:46:21 deraadt Exp $ */ /* * Copyright (c) 2003 Theo de Raadt @@ -86,17 +86,5 @@ main(int argc, char *argv[]) if (strcmp(buf, correct) != 0) exit(1); - - sz1 = (size_t)1; - sz2 = (size_t)-1; - p1 = (ptrdiff_t)1; - p2 = (ptrdiff_t)-1; - snprintf(buf, sizeof buf, - "%zx %d %zd %d %zu %d %tx %d %td %d %tu %zn %tn\n" - "%1$zx %3$zd %5$zu %7$tx %9$td %11$tu %14$zn %15$tn\n", - sz1, 0, sz2, 1, sz1, 2, p1, 3, p2, 4, p1, &sz3, &p3, &sz4, &p4); - if (strcmp(buf, correct2) != 0 || sz3 != 24 || p3 != 25 || - sz4 != 40 || p4 != 41) - exit(1); exit(0); }