diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-04 08:21:08 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-04 08:21:08 +0200 |
commit | 67d4f3c8f39f22a61ab9097163081d1a31e8d5a9 (patch) | |
tree | 5aafdbf15c00452fee7c35586e6c0b0f71c43257 | |
parent | 57daa3388cbb688a4c596456e9d4473ee1cacc53 (diff) | |
download | rsyslog-67d4f3c8f39f22a61ab9097163081d1a31e8d5a9.tar.gz rsyslog-67d4f3c8f39f22a61ab9097163081d1a31e8d5a9.tar.xz rsyslog-67d4f3c8f39f22a61ab9097163081d1a31e8d5a9.zip |
bugfix: off-by-one bug during certificate check
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | runtime/net.c | 6 |
2 files changed, 5 insertions, 2 deletions
@@ -2,6 +2,7 @@ Version 3.19.6 (rgerhards), 2008-06-?? - bugfix: part of permittedPeer structure was not correctly initialized thanks to varmojfekoj for spotting this +- bugfix: off-by-one bug during certificate check --------------------------------------------------------------------------- Version 3.19.5 (rgerhards), 2008-05-30 - enabled Posix ERE expressions inside the property replacer diff --git a/runtime/net.c b/runtime/net.c index 89e0838b..c3252269 100644 --- a/runtime/net.c +++ b/runtime/net.c @@ -287,8 +287,8 @@ PermittedPeerWildcardCompile(permittedPeers_t *pPeer) * of the text (it is supported at the start or end only). */ pPeer->etryType = PERM_PEER_TYPE_WILDCARD; - - for(pC = pPeer->pszID ; *pC != '\0' ; ++pC) { + pC = pPeer->pszID; + while(*pC != '\0') { pStart = pC; /* find end of domain component */ for( ; *pC != '\0' && *pC != '.' ; ++pC) @@ -299,6 +299,8 @@ PermittedPeerWildcardCompile(permittedPeers_t *pPeer) /* pStart is a dummy, it is not used if length is 0 */ CHKiRet(AddPermittedPeerWildcard(pPeer, pStart, 0)); } + if(*pC != '\0') + ++pC; } finalize_it: |