summaryrefslogtreecommitdiff
path: root/addrmatch.c
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2012-09-06 23:20:10 +0100
committerColin Watson <cjwatson@debian.org>2012-09-06 23:20:10 +0100
commitc6a2c0334e45419875687d250aed9bea78480f2e (patch)
treed8f01bef9f3921fa1ca7592a19474be9c8349f76 /addrmatch.c
parentdd5ed53e20d218607260916a6b04d1c8c5b3d88f (diff)
parent8b13b5bdc4f19bd52ee673104d66b71c21153b96 (diff)
merge 6.1p1
Diffstat (limited to 'addrmatch.c')
-rw-r--r--addrmatch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/addrmatch.c b/addrmatch.c
index 5b6773cce..388603cae 100644
--- a/addrmatch.c
+++ b/addrmatch.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: addrmatch.c,v 1.5 2010/02/26 20:29:54 djm Exp $ */ 1/* $OpenBSD: addrmatch.c,v 1.6 2012/06/21 00:16:07 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org> 4 * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org>
@@ -318,7 +318,7 @@ addr_pton_cidr(const char *p, struct xaddr *n, u_int *l)
318 char addrbuf[64], *mp, *cp; 318 char addrbuf[64], *mp, *cp;
319 319
320 /* Don't modify argument */ 320 /* Don't modify argument */
321 if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) > sizeof(addrbuf)) 321 if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) >= sizeof(addrbuf))
322 return -1; 322 return -1;
323 323
324 if ((mp = strchr(addrbuf, '/')) != NULL) { 324 if ((mp = strchr(addrbuf, '/')) != NULL) {