Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/citrus PR/54414: Valery Ushakov: c99 requires that ...



details:   https://anonhg.NetBSD.org/src/rev/be3a0713a555
branches:  trunk
changeset: 452944:be3a0713a555
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Jul 28 13:52:23 2019 +0000

description:
PR/54414: Valery Ushakov: c99 requires that wcsrtombs(3) updates the source
argument on conversion error

diffstat:

 lib/libc/citrus/citrus_none.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r a0a72d77d096 -r be3a0713a555 lib/libc/citrus/citrus_none.c
--- a/lib/libc/citrus/citrus_none.c     Sun Jul 28 13:49:22 2019 +0000
+++ b/lib/libc/citrus/citrus_none.c     Sun Jul 28 13:52:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: citrus_none.c,v 1.22 2017/07/13 16:00:30 christos Exp $        */
+/*     $NetBSD: citrus_none.c,v 1.23 2019/07/28 13:52:23 christos Exp $        */
 
 /*-
  * Copyright (c)2002 Citrus Project,
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_none.c,v 1.22 2017/07/13 16:00:30 christos Exp $");
+__RCSID("$NetBSD: citrus_none.c,v 1.23 2019/07/28 13:52:23 christos Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <assert.h>
@@ -300,6 +300,7 @@
 
        while (n > 0) {
                if ((*pwcs0 & ~0xFFU) != 0) {
+                       *pwcs = pwcs0;
                        *nresult = (size_t)-1;
                        return (EILSEQ);
                }



Home | Main Index | Thread Index | Old Index