mirror of git://anongit.mindrot.org/openssh.git
- dtucker@cvs.openbsd.org 2012/06/21 00:16:07
[addrmatch.c] fix strlcpy truncation check. from carsten at debian org, ok markus
This commit is contained in:
parent
8908da7dce
commit
97f43bbfc9
|
@ -1,3 +1,9 @@
|
|||
20120629
|
||||
- OpenBSD CVS Sync
|
||||
- dtucker@cvs.openbsd.org 2012/06/21 00:16:07
|
||||
[addrmatch.c]
|
||||
fix strlcpy truncation check. from carsten at debian org, ok markus
|
||||
|
||||
20120628
|
||||
- (dtucker) [openbsd-compat/getrrsetbyname-ldns.c] bz #2022: prevent null
|
||||
pointer deref in the client when built with LDNS and using DNSSEC with a
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: addrmatch.c,v 1.5 2010/02/26 20:29:54 djm Exp $ */
|
||||
/* $OpenBSD: addrmatch.c,v 1.6 2012/06/21 00:16:07 dtucker Exp $ */
|
||||
|
||||
/*
|
||||
* 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)
|
|||
char addrbuf[64], *mp, *cp;
|
||||
|
||||
/* Don't modify argument */
|
||||
if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) > sizeof(addrbuf))
|
||||
if (p == NULL || strlcpy(addrbuf, p, sizeof(addrbuf)) >= sizeof(addrbuf))
|
||||
return -1;
|
||||
|
||||
if ((mp = strchr(addrbuf, '/')) != NULL) {
|
||||
|
|
Loading…
Reference in New Issue