Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/rpc CID 1338517: Check negative returns
details: https://anonhg.NetBSD.org/src/rev/ab40b523198c
branches: trunk
changeset: 341530:ab40b523198c
user: christos <christos%NetBSD.org@localhost>
date: Tue Nov 10 18:08:05 2015 +0000
description:
CID 1338517: Check negative returns
diffstat:
lib/libc/rpc/svc_fdset.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 6884c5b291cd -r ab40b523198c lib/libc/rpc/svc_fdset.c
--- a/lib/libc/rpc/svc_fdset.c Tue Nov 10 18:06:53 2015 +0000
+++ b/lib/libc/rpc/svc_fdset.c Tue Nov 10 18:08:05 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: svc_fdset.c,v 1.12 2015/11/08 19:30:53 christos Exp $ */
+/* $NetBSD: svc_fdset.c,v 1.13 2015/11/10 18:08:05 christos Exp $ */
/*-
* Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: svc_fdset.c,v 1.12 2015/11/08 19:30:53 christos Exp $");
+__RCSID("$NetBSD: svc_fdset.c,v 1.13 2015/11/10 18:08:05 christos Exp $");
#include "reentrant.h"
@@ -434,6 +434,8 @@
svc_pollfd_copy(const struct pollfd *orig)
{
int size = svc_fdset_getsize(0);
+ if (size == -1)
+ return NULL;
struct pollfd *copy = calloc(size, sizeof(*orig));
if (copy == NULL)
return NULL;
Home |
Main Index |
Thread Index |
Old Index