abduco

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit f02c3fc3c09ea230778740753bf0d5aab743960f
parent bd3dcba5488a4c6e5daee0998d40f76c9fe1f78c
Author: Marc André Tanner <mat@brain-dump.org>
Date:   Tue, 17 Feb 2015 00:34:44 +0100

Fix validation creteria

Diffstat:
abduco.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/abduco.c b/abduco.c @@ -182,7 +182,7 @@ static bool recv_packet(int socket, Packet *pkt) { ssize_t len = read_all(socket, (char*)pkt, packet_header_size()); if (len <= 0 || len != packet_header_size()) return false; - if (len > sizeof(pkt->u.msg)) + if (pkt->len > sizeof(pkt->u.msg)) return false; if (pkt->len > 0) { len = read_all(socket, pkt->u.msg, pkt->len);