summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryasuoka <yasuoka@openbsd.org>2015-08-02 23:29:27 +0000
committeryasuoka <yasuoka@openbsd.org>2015-08-02 23:29:27 +0000
commit7ffc22eeb4e14980c1065538f5987df50507019b (patch)
treed4ecca98221d68046e0e0dd08aaf67d6687fb26f
parentFire pending events when the module starts. (diff)
downloadwireguard-openbsd-7ffc22eeb4e14980c1065538f5987df50507019b.tar.xz
wireguard-openbsd-7ffc22eeb4e14980c1065538f5987df50507019b.zip
Check the received packet length properly.
-rw-r--r--usr.sbin/radiusd/radiusd_module.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/radiusd/radiusd_module.c b/usr.sbin/radiusd/radiusd_module.c
index 77cda7b7fc2..03b161661c7 100644
--- a/usr.sbin/radiusd/radiusd_module.c
+++ b/usr.sbin/radiusd/radiusd_module.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radiusd_module.c,v 1.3 2015/08/02 21:30:34 yasuoka Exp $ */
+/* $OpenBSD: radiusd_module.c,v 1.4 2015/08/02 23:29:27 yasuoka Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@ -450,7 +450,7 @@ module_imsg_handler(struct module_base *base, struct imsg *imsg)
base->radpktoff += chunklen;
if (!accessreq->final)
goto accsreq_out;
- if (base->radpktoff != base->radpktsiz) {
+ if (base->radpktoff != accessreq->datalen) {
syslog(LOG_ERR,
"Could not handle received ACCSREQ "
"message: length is mismatch");