summaryrefslogtreecommitdiff
path: root/radsecproxy.c
diff options
context:
space:
mode:
Diffstat (limited to 'radsecproxy.c')
-rw-r--r--radsecproxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/radsecproxy.c b/radsecproxy.c
index 99dd652..9ab9d81 100644
--- a/radsecproxy.c
+++ b/radsecproxy.c
@@ -479,7 +479,7 @@ struct peer *id2peer(char *id, uint8_t len) {
for (realm = peers[i].realms; *realm; realm++) {
/* assume test@domain */
printf("realmlength %d, usernamelenght %d\n", strlen(*realm), len);
- if (strlen(*realm) == len && !memcmp(id + 5, *realm, len)) {
+ if (strlen(*realm) == len && !memcmp(id + 5, *realm, len - 5)) {
printf("found matching realm: %s, host %s\n", *realm, peers[i].host);
return peers + i;
}