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/62eeff709432
branches: trunk
changeset: 1000555:62eeff709432
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_ctype_template.h | 3 ++-
lib/libc/citrus/citrus_none.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diffs (43 lines):
diff -r 1adc335afda4 -r 62eeff709432 lib/libc/citrus/citrus_ctype_template.h
--- a/lib/libc/citrus/citrus_ctype_template.h Sun Jul 28 13:49:22 2019 +0000
+++ b/lib/libc/citrus/citrus_ctype_template.h Sun Jul 28 13:52:23 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_ctype_template.h,v 1.36 2013/05/28 16:57:56 joerg Exp $ */
+/* $NetBSD: citrus_ctype_template.h,v 1.37 2019/07/28 14:26:08 christos Exp $ */
/*-
* Copyright (c)2002 Citrus Project,
@@ -372,6 +372,7 @@
err = _FUNCNAME(wcrtomb_priv)(ei, buf, sizeof(buf),
*pwcs0, psenc, &siz);
if (siz == (size_t)-1) {
+ *pwcs = pwcs0;
*nresult = siz;
return (err);
}
diff -r 1adc335afda4 -r 62eeff709432 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