summaryrefslogtreecommitdiffstats
path: root/runtime/net.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-06-04 08:21:08 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-06-04 08:21:08 +0200
commit67d4f3c8f39f22a61ab9097163081d1a31e8d5a9 (patch)
tree5aafdbf15c00452fee7c35586e6c0b0f71c43257 /runtime/net.c
parent57daa3388cbb688a4c596456e9d4473ee1cacc53 (diff)
downloadrsyslog-67d4f3c8f39f22a61ab9097163081d1a31e8d5a9.tar.gz
rsyslog-67d4f3c8f39f22a61ab9097163081d1a31e8d5a9.tar.xz
rsyslog-67d4f3c8f39f22a61ab9097163081d1a31e8d5a9.zip
bugfix: off-by-one bug during certificate check
Diffstat (limited to 'runtime/net.c')
-rw-r--r--runtime/net.c6
1 files changed, 4 insertions, 2 deletions
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: