Module Name: src
Committed By: mrg
Date: Thu Jan 24 22:07:14 UTC 2019
Modified Files:
src/lib/libwrap: expandm.c
Log Message:
remove the new check for tlen >= PTRDIFF_MAX. the prior
checks assure the condition is met and GCC7 is happy.
suggested by kre.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libwrap/expandm.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libwrap/expandm.c
diff -u src/lib/libwrap/expandm.c:1.11 src/lib/libwrap/expandm.c:1.12
--- src/lib/libwrap/expandm.c:1.11 Wed Jan 23 02:48:48 2019
+++ src/lib/libwrap/expandm.c Thu Jan 24 22:07:14 2019
@@ -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 @@ expandm(const char *fmt, const char *sf,
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;