Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libwrap remove the new check for tlen >= PTRDIFF_MAX. t...
details: https://anonhg.NetBSD.org/src/rev/b2275a95ec05
branches: trunk
changeset: 448186:b2275a95ec05
user: mrg <mrg%NetBSD.org@localhost>
date: Thu Jan 24 22:07:14 2019 +0000
description:
remove the new check for tlen >= PTRDIFF_MAX. the prior
checks assure the condition is met and GCC7 is happy.
suggested by kre.
diffstat:
lib/libwrap/expandm.c | 11 ++---------
1 files changed, 2 insertions(+), 9 deletions(-)
diffs (32 lines):
diff -r 14558ba01d8b -r b2275a95ec05 lib/libwrap/expandm.c
--- a/lib/libwrap/expandm.c Thu Jan 24 22:00:28 2019 +0000
+++ b/lib/libwrap/expandm.c Thu Jan 24 22:07:14 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: expandm.c,v 1.11 2019/01/23 02:48:48 kre Exp $ */
+/* $NetBSD: expandm.c,v 1.12 2019/01/24 22:07:14 mrg Exp $ */
/*-
* Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: expandm.c,v 1.11 2019/01/23 02:48:48 kre Exp $");
+__RCSID("$NetBSD: expandm.c,v 1.12 2019/01/24 22:07:14 mrg Exp $");
#include <limits.h>
#include <stdio.h>
@@ -82,13 +82,6 @@
tlen = nlen + blen;
- /*
- * We can't exceed PTRDIFF_MAX because we would
- * not be able to address the pointers
- */
- if (tlen >= PTRDIFF_MAX)
- goto out;
-
nbuf = realloc(buf, tlen + 1);
if (nbuf == NULL)
goto out;
Home |
Main Index |
Thread Index |
Old Index