summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorkevlo <kevlo@openbsd.org>2017-12-08 01:03:51 +0000
committerkevlo <kevlo@openbsd.org>2017-12-08 01:03:51 +0000
commit367240bd3bf23d13ce0cdd2fdaa27972e74e4d80 (patch)
tree43988807c77ccf8a30ee46289a8976724d9adfe7 /lib/libc/stdio
parentChange the SA payload parser to parse more than the first proposal. This (diff)
downloadwireguard-openbsd-367240bd3bf23d13ce0cdd2fdaa27972e74e4d80.tar.xz
wireguard-openbsd-367240bd3bf23d13ce0cdd2fdaa27972e74e4d80.zip
Fix the return value of fwscanf(3) when encountering an early matching
failure. This change brings fwscanf(3) back in line with fscanf(3). From FreeBSD; ok deraadt@, millert@
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/vfwscanf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/vfwscanf.c b/lib/libc/stdio/vfwscanf.c
index 7827244c0b2..8cb83f69224 100644
--- a/lib/libc/stdio/vfwscanf.c
+++ b/lib/libc/stdio/vfwscanf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfwscanf.c,v 1.6 2016/10/30 05:07:06 jsg Exp $ */
+/* $OpenBSD: vfwscanf.c,v 1.7 2017/12/08 01:03:51 kevlo Exp $ */
/*-
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
@@ -165,7 +165,7 @@ literal:
goto input_failure;
if (wi != c) {
__ungetwc(wi, fp);
- goto input_failure;
+ goto match_failure;
}
nread++;
continue;