Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/citrus return EINVAL when module validation failed, ...
details: https://anonhg.NetBSD.org/src/rev/61112479314e
branches: trunk
changeset: 771411:61112479314e
user: tnozaki <tnozaki%NetBSD.org@localhost>
date: Sat Nov 19 18:34:21 2011 +0000
description:
return EINVAL when module validation failed, pointed by nonaka-san(again).
diffstat:
lib/libc/citrus/citrus_ctype.c | 8 +++++---
lib/libc/citrus/citrus_iconv.c | 8 +++++---
lib/libc/citrus/citrus_mapper.c | 8 +++++---
lib/libc/citrus/citrus_stdenc.c | 8 +++++---
4 files changed, 20 insertions(+), 12 deletions(-)
diffs (120 lines):
diff -r cb5d67387747 -r 61112479314e lib/libc/citrus/citrus_ctype.c
--- a/lib/libc/citrus/citrus_ctype.c Sat Nov 19 18:20:13 2011 +0000
+++ b/lib/libc/citrus/citrus_ctype.c Sat Nov 19 18:34:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_ctype.c,v 1.5 2008/06/14 16:01:07 tnozaki Exp $ */
+/* $NetBSD: citrus_ctype.c,v 1.6 2011/11/19 18:34:21 tnozaki Exp $ */
/*-
* Copyright (c)1999, 2000, 2001, 2002 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_ctype.c,v 1.5 2008/06/14 16:01:07 tnozaki Exp $");
+__RCSID("$NetBSD: citrus_ctype.c,v 1.6 2011/11/19 18:34:21 tnozaki Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -113,8 +113,10 @@
cc->cc_ops->co_wcstombs == NULL ||
cc->cc_ops->co_wctomb == NULL ||
cc->cc_ops->co_btowc == NULL ||
- cc->cc_ops->co_wctob == NULL)
+ cc->cc_ops->co_wctob == NULL) {
+ ret = EINVAL;
goto bad;
+ }
/* init and get closure */
ret = (*cc->cc_ops->co_init)(
diff -r cb5d67387747 -r 61112479314e lib/libc/citrus/citrus_iconv.c
--- a/lib/libc/citrus/citrus_iconv.c Sat Nov 19 18:20:13 2011 +0000
+++ b/lib/libc/citrus/citrus_iconv.c Sat Nov 19 18:34:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_iconv.c,v 1.9 2011/03/30 08:22:01 jruoho Exp $ */
+/* $NetBSD: citrus_iconv.c,v 1.10 2011/11/19 18:34:21 tnozaki Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_iconv.c,v 1.9 2011/03/30 08:22:01 jruoho Exp $");
+__RCSID("$NetBSD: citrus_iconv.c,v 1.10 2011/11/19 18:34:21 tnozaki Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -222,8 +222,10 @@
ci->ci_ops->io_uninit_shared == NULL ||
ci->ci_ops->io_init_context == NULL ||
ci->ci_ops->io_uninit_context == NULL ||
- ci->ci_ops->io_convert == NULL)
+ ci->ci_ops->io_convert == NULL) {
+ ret = EINVAL;
goto err;
+ }
/* initialize the converter */
ret = (*ci->ci_ops->io_init_shared)(ci, basedir, src, dst,
diff -r cb5d67387747 -r 61112479314e lib/libc/citrus/citrus_mapper.c
--- a/lib/libc/citrus/citrus_mapper.c Sat Nov 19 18:20:13 2011 +0000
+++ b/lib/libc/citrus/citrus_mapper.c Sat Nov 19 18:34:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_mapper.c,v 1.7 2008/07/25 14:05:25 christos Exp $ */
+/* $NetBSD: citrus_mapper.c,v 1.8 2011/11/19 18:39:58 tnozaki Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_mapper.c,v 1.7 2008/07/25 14:05:25 christos Exp $");
+__RCSID("$NetBSD: citrus_mapper.c,v 1.8 2011/11/19 18:39:58 tnozaki Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -251,8 +251,10 @@
if (!cm->cm_ops->mo_init ||
!cm->cm_ops->mo_uninit ||
!cm->cm_ops->mo_convert ||
- !cm->cm_ops->mo_init_state)
+ !cm->cm_ops->mo_init_state) {
+ ret = EINVAL;
goto err;
+ }
/* allocate traits structure */
cm->cm_traits = malloc(sizeof(*cm->cm_traits));
diff -r cb5d67387747 -r 61112479314e lib/libc/citrus/citrus_stdenc.c
--- a/lib/libc/citrus/citrus_stdenc.c Sat Nov 19 18:20:13 2011 +0000
+++ b/lib/libc/citrus/citrus_stdenc.c Sat Nov 19 18:34:21 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_stdenc.c,v 1.3 2005/10/29 18:02:04 tshiozak Exp $ */
+/* $NetBSD: citrus_stdenc.c,v 1.4 2011/11/19 18:39:58 tnozaki Exp $ */
/*-
* Copyright (c)2003 Citrus Project,
@@ -28,7 +28,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_stdenc.c,v 1.3 2005/10/29 18:02:04 tshiozak Exp $");
+__RCSID("$NetBSD: citrus_stdenc.c,v 1.4 2011/11/19 18:39:58 tnozaki Exp $");
#endif /* LIBC_SCCS and not lint */
#include "namespace.h"
@@ -128,8 +128,10 @@
ce->ce_ops->eo_cstomb == NULL ||
ce->ce_ops->eo_mbtowc == NULL ||
ce->ce_ops->eo_wctomb == NULL ||
- ce->ce_ops->eo_get_state_desc == NULL)
+ ce->ce_ops->eo_get_state_desc == NULL) {
+ ret = EINVAL;
goto bad;
+ }
/* allocate traits */
ce->ce_traits = malloc(sizeof(*ce->ce_traits));
Home |
Main Index |
Thread Index |
Old Index