summaryrefslogtreecommitdiff
path: root/openbsd-compat/regress/snprintftest.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2019-10-09 22:59:48 +0100
committerColin Watson <cjwatson@debian.org>2019-10-09 22:59:48 +0100
commit4213eec74e74de6310c27a40c3e9759a08a73996 (patch)
treee97a6dcafc6763aea7c804e4e113c2750cb1400d /openbsd-compat/regress/snprintftest.c
parent102062f825fb26a74295a1c089c00c4c4c76b68a (diff)
parentcdf1d0a9f5d18535e0a18ff34860e81a6d83aa5c (diff)
Import openssh_8.1p1.orig.tar.gz
Diffstat (limited to 'openbsd-compat/regress/snprintftest.c')
-rw-r--r--openbsd-compat/regress/snprintftest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsd-compat/regress/snprintftest.c b/openbsd-compat/regress/snprintftest.c
index 4ca63e180..6dc2e222a 100644
--- a/openbsd-compat/regress/snprintftest.c
+++ b/openbsd-compat/regress/snprintftest.c
@@ -47,7 +47,7 @@ int
47main(void) 47main(void)
48{ 48{
49 char b[5]; 49 char b[5];
50 char *src; 50 char *src = NULL;
51 51
52 snprintf(b,5,"123456789"); 52 snprintf(b,5,"123456789");
53 if (b[4] != '\0') 53 if (b[4] != '\0')
@@ -69,5 +69,6 @@ main(void)
69 if (x_snprintf(b, 1, "%s %d", "hello", 12345) != 11) 69 if (x_snprintf(b, 1, "%s %d", "hello", 12345) != 11)
70 fail("vsnprintf does not return required length"); 70 fail("vsnprintf does not return required length");
71 71
72 free(src);
72 return failed; 73 return failed;
73} 74}