diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | addrmatch.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ | |||
1 | 20120629 | ||
2 | - OpenBSD CVS Sync | ||
3 | - dtucker@cvs.openbsd.org 2012/06/21 00:16:07 | ||
4 | [addrmatch.c] | ||
5 | fix strlcpy truncation check. from carsten at debian org, ok markus | ||
6 | |||
1 | 20120628 | 7 | 20120628 |
2 | - (dtucker) [openbsd-compat/getrrsetbyname-ldns.c] bz #2022: prevent null | 8 | - (dtucker) [openbsd-compat/getrrsetbyname-ldns.c] bz #2022: prevent null |
3 | pointer deref in the client when built with LDNS and using DNSSEC with a | 9 | pointer deref in the client when built with LDNS and using DNSSEC with a |
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) { |